You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2021/03/09 09:20:24 UTC
svn commit: r1887360 - /httpd/httpd/trunk/modules/md/md_crypt.c
Author: icing
Date: Tue Mar 9 09:20:24 2021
New Revision: 1887360
URL: http://svn.apache.org/viewvc?rev=1887360&view=rev
Log:
lets try ASN1_STRING_data() for openssl 1.0.2
Modified:
httpd/httpd/trunk/modules/md/md_crypt.c
Modified: httpd/httpd/trunk/modules/md/md_crypt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_crypt.c?rev=1887360&r1=1887359&r2=1887360&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_crypt.c (original)
+++ httpd/httpd/trunk/modules/md/md_crypt.c Tue Mar 9 09:20:24 2021
@@ -1212,10 +1212,13 @@ apr_status_t md_cert_get_alt_names(apr_a
APR_ARRAY_PUSH(names, const char *) = apr_pstrdup(p, (char*)buf);
OPENSSL_free(buf);
break;
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
case GEN_IPADD:
len = ASN1_STRING_length(cval->d.iPAddress);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ip = ASN1_STRING_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]);
@@ -1232,7 +1235,6 @@ apr_status_t md_cert_get_alt_names(apr_a
; /* Unknown address type - Log? Assert? */
}
break;
-#endif
default:
break;
}