]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
Bitrot: More OpenSSL 1.1.0 API constification
authorViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 20 Aug 2016 06:01:18 +0000 (02:01 -0400)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 20 Aug 2016 06:01:18 +0000 (02:01 -0400)
The accessor for ASN1_STRING has a new name and now returns const
data.  Deal with the fallout.

postfix/src/tls/tls.h
postfix/src/tls/tls_verify.c

index 78348eabd50b21b7a7adf80b059770244cac744a..211ead72212e8b2faa5d30bd258530ffef351e66 100644 (file)
@@ -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
 
  /*
index ea3bfb960018bba4e788be725f562ff59ffc9e3a..0962f837788c7c9bbe4b86d28cfed07f544b4fcf 100644 (file)
@@ -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);