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/08 21:51:53 UTC

svn commit: r1887343 - /httpd/httpd/trunk/modules/md/md_crypt.c

Author: icing
Date: Mon Mar  8 21:51:53 2021
New Revision: 1887343

URL: http://svn.apache.org/viewvc?rev=1887343&view=rev
Log:
refrain from handling ip address alt names in pre 1.1 openssl

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=1887343&r1=1887342&r2=1887343&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_crypt.c (original)
+++ httpd/httpd/trunk/modules/md/md_crypt.c Mon Mar  8 21:51:53 2021
@@ -1212,13 +1212,10 @@ 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_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]);
@@ -1235,6 +1232,7 @@ apr_status_t md_cert_get_alt_names(apr_a
                         ; /* Unknown address type - Log?  Assert? */
                     }
                     break;
+#endif
                 default:
                     break;
             }