summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2013-01-18 03:47:47 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2013-01-18 03:47:47 +0400
commite70d1bfe647b2426afe769a26c8febbbfe0aff96 (patch)
treeb1c5b4a73c74cbde4c60c5d8029d718fa072aac9
parent30e237041d5cd7c39e33a9382c96f109be23337d (diff)
downloadnode-e70d1bfe647b2426afe769a26c8febbbfe0aff96.tar.gz
Revert "Revert "tls: allow wildcards in common name""
This reverts commit 30e237041d5cd7c39e33a9382c96f109be23337d. Works properly with b4b750b
-rw-r--r--lib/tls.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/tls.js b/lib/tls.js
index c62d40f8f..d6518f502 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -156,14 +156,13 @@ function checkServerIdentity(host, cert) {
dnsNames = dnsNames.concat(uriNames);
// And only after check if hostname matches CN
- // (because CN is deprecated, but should be used for compatiblity anyway)
var commonNames = cert.subject.CN;
if (Array.isArray(commonNames)) {
for (var i = 0, k = commonNames.length; i < k; ++i) {
- dnsNames.push(regexpify(commonNames[i], false));
+ dnsNames.push(regexpify(commonNames[i], true));
}
} else {
- dnsNames.push(regexpify(commonNames, false));
+ dnsNames.push(regexpify(commonNames, true));
}
valid = dnsNames.some(function(re) {