From: Stefan Eissing Date: Mon, 8 Mar 2021 20:15:01 +0000 (+0000) Subject: Use ASN1_STRING_data() if openssl verison < 1.1. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1000 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff5583ba76d90938e2c7fbe33b4667a5355d0ece;p=thirdparty%2Fapache%2Fhttpd.git Use ASN1_STRING_data() if openssl verison < 1.1. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887342 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/md/md_crypt.c b/modules/md/md_crypt.c index 237a85df3df..cd9fa13daa9 100644 --- a/modules/md/md_crypt.c +++ b/modules/md/md_crypt.c @@ -1214,7 +1214,11 @@ apr_status_t md_cert_get_alt_names(apr_array_header_t **pnames, const md_cert_t break; case GEN_IPADD: len = ASN1_STRING_length(cval->d.iPAddress); +#if OPENSSL_VERSION_NUMBER < 0x10100000L + ip = ASN1_STRING_get_data(cval->d.iPAddress); +#else ip = ASN1_STRING_get0_data(cval->d.iPAddress); +#endif if (len == 4) /* IPv4 address */ APR_ARRAY_PUSH(names, const char *) = apr_psprintf(p, "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);