From: Viktor Dukhovni Date: Sat, 20 Aug 2016 06:01:18 +0000 (-0400) Subject: Bitrot: More OpenSSL 1.1.0 API constification X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e6c2649ebfed9c8405024bb34f122147eb052e7;p=thirdparty%2Fpostfix.git Bitrot: More OpenSSL 1.1.0 API constification The accessor for ASN1_STRING has a new name and now returns const data. Deal with the fallout. --- diff --git a/postfix/src/tls/tls.h b/postfix/src/tls/tls.h index 78348eabd..211ead722 100644 --- a/postfix/src/tls/tls.h +++ b/postfix/src/tls/tls.h @@ -59,6 +59,7 @@ extern const NAME_CODE tls_level_table[]; /* Backwards compatibility with OpenSSL < 1.1.0 */ #if OPENSSL_VERSION_NUMBER < 0x10100000L #define OpenSSL_version_num SSLeay ++#define ASN1_STRING_get0_data ASN1_STRING_data #endif /* diff --git a/postfix/src/tls/tls_verify.c b/postfix/src/tls/tls_verify.c index ea3bfb960..0962f8377 100644 --- a/postfix/src/tls/tls_verify.c +++ b/postfix/src/tls/tls_verify.c @@ -439,7 +439,7 @@ const char *tls_dns_name(const GENERAL_NAME * gn, /* * Safe to treat as an ASCII string possibly holding a DNS name */ - dnsname = (char *) ASN1_STRING_data(gn->d.ia5); + dnsname = (const char *) ASN1_STRING_get0_data(gn->d.ia5); len = ASN1_STRING_length(gn->d.ia5); TRIM0(dnsname, len);