mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-21 08:11:47 -09:00
package/libesmtp: fix build with OpenSSL 4.0.0
Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
a16d792813
commit
6fc480e3bd
@@ -0,0 +1,36 @@
|
||||
From 0705423e2596a21e2d4e1f3fd492792956a4bad3 Mon Sep 17 00:00:00 2001
|
||||
From: Ravi Kant Sharma <ravi.kant.sharma@canonical.com>
|
||||
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
|
||||
|
||||
Upstream: https://github.com/libesmtp/libESMTP/pull/34
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
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))
|
||||
--
|
||||
2.47.3
|
||||
|
||||
Reference in New Issue
Block a user