]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Use ASN1_STRING_data() if openssl verison < 1.1.
authorStefan Eissing <icing@apache.org>
Mon, 8 Mar 2021 20:15:01 +0000 (20:15 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 8 Mar 2021 20:15:01 +0000 (20:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887342 13f79535-47bb-0310-9956-ffa450edef68

modules/md/md_crypt.c

index 237a85df3df4960513b9587afafb26cb81cb2596..cd9fa13daa961a8b9a656be44e77494c963bedb1 100644 (file)
@@ -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]);