From f74ac43fcd2af19dac28901bfb9dd1e62a8ec7b0 Mon Sep 17 00:00:00 2001 From: Ravi Kant Sharma Date: Tue, 28 Jul 2026 20:35:48 +0200 Subject: [PATCH] Fix build with OpenSSL 4.0 opaque ASN1_STRING OpenSSL 4.0 made ASN1_STRING opaque, so direct access to ->data and ->length fields no longer compiles. Use ASN1_STRING_get0_data() and ASN1_STRING_length() accessors which are available since OpenSSL 1.1.0. Fixes #33 --- smtp-tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smtp-tls.c b/smtp-tls.c index 9f3e50e..981284e 100644 --- a/smtp-tls.c +++ b/smtp-tls.c @@ -599,8 +599,8 @@ check_acceptable_security (smtp_session_t session, SSL *ssl) if (name->type == GEN_DNS) { - const char *ia5str = (const char *) name->d.ia5->data; - size_t ia5len = name->d.ia5->length; + const char *ia5str = (const char *) ASN1_STRING_get0_data(name->d.ia5); + size_t ia5len = ASN1_STRING_length(name->d.ia5); hasaltname = 1; if (strlen (ia5str) == ia5len && match_domain (host, ia5str))