master hovercats/oakiss / pkg / openbsd / patch / 0044-nc-Revert-to-libressl-4.3-libtls-API.patch
 1From 6aa6476b05becacf50fab5371eb8764337c87e7f Mon Sep 17 00:00:00 2001
 2From: Michael Forney <mforney@mforney.org>
 3Date: Tue, 27 Oct 2026 11:44:18 -0700
 4Subject: [PATCH] nc: Revert to libressl-4.3 libtls API
 5
 6Until we sync libtls-bearssl with libressl-4.4, we don't have
 7tls_peer_cert_unverified_bundle_pem. Revert to tls_peer_cert_chain_pem
 8for now.
 9---
10 usr.bin/nc/netcat.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
14index 5a8cbbaee7b..1a1a612b103 100644
15--- a/usr.bin/nc/netcat.c
16+++ b/usr.bin/nc/netcat.c
17@@ -1763,7 +1763,7 @@ save_peer_cert(struct tls *tls_ctx, FILE *fp)
18 	const char *pem;
19 	size_t plen;
20 
21-	if ((pem = (char *)tls_peer_cert_unverified_bundle_pem(tls_ctx, &plen)) == NULL)
22+	if ((pem = (char *)tls_peer_cert_chain_pem(tls_ctx, &plen)) == NULL)
23 		errx(1, "Can't get peer certificate");
24 	if (fprintf(fp, "%.*s", (int)plen, pem) < 0)
25 		err(1, "unable to save peer cert");
26-- 
272.54.0
28