control: tag -1 patch Dear maintainer,
here's a patch that fixes the build with OpenSSL 4 by using ASN1_STRING_* accessor functions. Cheers, -Hilko
>From 45a8ee8bfcabe6a7907c504e6112ba1419bcf10f Mon Sep 17 00:00:00 2001 From: Hilko Bengen <[email protected]> Date: Tue, 2 Jun 2026 00:39:12 +0200 Subject: [PATCH] Use OpenSSL ASN1_STRING accessor functions instead of direct field access --- src/mx/xtls.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mx/xtls.c b/src/mx/xtls.c index 7e244a56..00d53fd0 100644 --- a/src/mx/xtls.c +++ b/src/mx/xtls.c @@ -707,7 +707,7 @@ a_xtls_parse_asn1_time(ASN1_TIME const *atp, char *bdat, uz blen) snprintf(bdat, blen, "%.*s", (int)l, mcp); else { snprintf(bdat, blen, _("Bogus certificate date: %.*s"), - /*is (int)*/atp->length, (char const*)atp->data); + /*is (int)*/ASN1_STRING_length(atp), ASN1_STRING_get0_data(atp)); mcp = NULL; } @@ -1398,9 +1398,9 @@ a_xtls_check_host(struct mx_socket *sop, X509 *peercert, if(gen->type == GEN_DNS){ if(n_poption & n_PO_D_V) n_err(_("Comparing subject_alt_name: need<%s> is<%s>\n"), - urlp->url_host.s, (char*)gen->d.ia5->data); + urlp->url_host.s, ASN1_STRING_get0_data(gen->d.ia5)); if((rv = n_tls_rfc2595_hostname_match(urlp->url_host.s, - (char*)gen->d.ia5->data))) + ASN1_STRING_get0_data(gen->d.ia5)))) goto jleave; } } @@ -1522,8 +1522,8 @@ smime_verify(struct message *m, int n, a_XTLS_STACKOF(X509) *chain, if (gen->type == GEN_EMAIL) { if (n_poption & n_PO_D_V) n_err(_("Comparing subject_alt_name: need<%s> is<%s>)\n"), - sender, (char*)gen->d.ia5->data); - if (!su_cs_cmp_case((char*)gen->d.ia5->data, sender)) + sender, ASN1_STRING_get0_data(gen->d.ia5)); + if (!su_cs_cmp_case(ASN1_STRING_get0_data(gen->d.ia5), sender)) goto jfound; } } -- 2.53.0

