ASN1_STRING_length() is deprecated in version 4.1.0, with the
replacement ASN1_STRING_get_length() also added in version 4.1.0.
---
 mutt_ssl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mutt_ssl.c b/mutt_ssl.c
index 9a390343..cc3485fe 100644
--- a/mutt_ssl.c
+++ b/mutt_ssl.c
@@ -46,8 +46,11 @@
 #define SSL_has_pending SSL_pending
 #endif
 
+#if (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x40100000L)
+  #define mutt_get_asn1_string_length(str) ASN1_STRING_get_length((str))
+  #define mutt_get_asn1_string_data(str) ASN1_STRING_get0_data((str))
 /* Starting OpenSSL v4, the ASN1_STRING type is now opaque */
-#if (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x40000000L)
+#elif (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 
0x40000000L)
   #define mutt_get_asn1_string_length(str) ASN1_STRING_length((str))
   #define mutt_get_asn1_string_data(str) ASN1_STRING_get0_data((str))
 #else
-- 
2.56.1

Reply via email to