Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

tls: Re-enable checking of CN-ID in server identity verification #5221

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ function checkServerIdentity(host, cert) {
//
// Walk through altnames and generate lists of those names
if (cert.subjectaltname) {
matchCN = false;
cert.subjectaltname.split(/, /g).forEach(function(altname) {
if (/^DNS:/.test(altname)) {
dnsNames.push(altname.slice(4));
Expand Down Expand Up @@ -178,7 +177,7 @@ function checkServerIdentity(host, cert) {

if (dnsNames.length > 0) matchCN = false;

// Match against Common Name (CN) only if altnames are not present.
// Match against Common Name (CN) only if no supported identifiers are present.
//
// "As noted, a client MUST NOT seek a match for a reference identifier
// of CN-ID if the presented identifiers include a DNS-ID, SRV-ID,
Expand Down