mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
* 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> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@378487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -856,14 +856,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,
|
||||
|
Reference in New Issue
Block a user