]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r378487 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 4 Sep 2007 11:44:14 +0000 (11:44 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 4 Sep 2007 11:44:14 +0000 (11:44 +0000)
* modules/ssl/ssl_engine_init.c (ssl_check_public_cert): Fix spurious
hostname-mismatch warning for valid wildcard certs.

PR: 37911
Submitted by: Nick Burch <nick torchbox.com>

Submitted by: jorton
Reviewed by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@572630 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/ssl/ssl_engine_init.c

diff --git a/CHANGES b/CHANGES
index 8578e2424b19416dcbf467aeb7502b715e8cc4d2..b4b9de0496247defbcd8f0869be6062df185b00d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.6
 
+  *) mod_ssl: Fix spurious hostname mismatch warning for valid
+     wildcard certificates.  PR 37911.  [Nick Burch <nick torchbox.com>]
+
   *) mod_mem_cache: Increase the minimum and default value for
      MCacheMinObjectSize from 0 to 1, as a MCacheMinObjectSize of 0 does not
      make sense and leads to a division by zero.  PR 40576.
diff --git a/STATUS b/STATUS
index e5342223178a07f251a3a4d9967064abc9e393b5..21cbcd261f63334287be28b59176fe081d057b90 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -80,14 +80,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
 
-    * mod_ssl: Fix spurious hostname-mismatch warning for valid wildcard certs.
-      PR 37911.
-      Trunk version of patch:
-         http://svn.apache.org/viewcvs.cgi?rev=378487&view=rev
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works
-      +1: rpluem, fielding, jim
-
     * mod_info: mod_info outputs invalid XHTML 1.0 Transitional.
       PR 42847.
       Trunk version of patch:
index 5046989b849ef73c4e45e8466204b7f3b496d21b..ff2a49463089895ebdcf07e3880adc85d7ee8e1e 100644 (file)
@@ -826,14 +826,14 @@ static void ssl_check_public_cert(server_rec *s,
     if (SSL_X509_getCN(ptemp, cert, &cn)) {
         int fnm_flags = APR_FNM_PERIOD|APR_FNM_CASE_BLIND;
 
-        if (apr_fnmatch_test(cn) &&
-            (apr_fnmatch(cn, s->server_hostname,
-                         fnm_flags) == APR_FNM_NOMATCH))
-        {
-            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "%s server certificate wildcard CommonName (CN) `%s' "
-                         "does NOT match server name!?",
-                         ssl_asn1_keystr(type), cn);
+        if (apr_fnmatch_test(cn)) {
+            if (apr_fnmatch(cn, s->server_hostname,
+                            fnm_flags) == APR_FNM_NOMATCH) {
+                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
+                             "%s server certificate wildcard CommonName "
+                             "(CN) `%s' does NOT match server name!?",
+                             ssl_asn1_keystr(type), cn);
+            }
         }
         else if (strNE(s->server_hostname, cn)) {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,