You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by rr...@apache.org on 2018/11/08 18:46:50 UTC

[trafficserver] branch master updated: Allows the use of certs with no commonName, but with subjectAltNames

This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 458fdb6  Allows the use of certs with no commonName, but with subjectAltNames
458fdb6 is described below

commit 458fdb634211801a59de27d284c729c2f84a6e50
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Wed Nov 7 14:26:32 2018 -0800

    Allows the use of certs with no commonName, but with subjectAltNames
---
 iocore/net/SSLUtils.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 7a0b579..bceae8b 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -1496,7 +1496,7 @@ ssl_index_certificate(SSLCertLookup *lookup, SSLCertContext const &cc, X509 *cer
       if (name->type == GEN_DNS) {
         ats_scoped_str dns(asn1_strdup(name->d.dNSName));
         // only try to insert if the alternate name is not the main name
-        if (strcmp(dns, subj_name) != 0) {
+        if (subj_name == nullptr || strcmp(dns, subj_name) != 0) {
           Debug("ssl", "mapping '%s' to certificates %s", (const char *)dns, certname);
           if (lookup->insert(dns, cc) >= 0) {
             inserted = true;