diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-08-12 23:46:56 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-08-12 23:48:26 +0400 |
commit | 6b18e88b68a723b3749d7770c043d7f711c89569 (patch) | |
tree | fc9bc7da22a5f4a4b92b8cf617a773e44f7edd21 /test | |
parent | 4ef808ec0af61011f6015c29deb4bcc063845e8b (diff) |
tls: handle multiple CN fields when verifying cert
Fixes #3861.
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-tls-check-server-identity.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/simple/test-tls-check-server-identity.js b/test/simple/test-tls-check-server-identity.js index 99835f8f5e3..39093a71614 100644 --- a/test/simple/test-tls-check-server-identity.js +++ b/test/simple/test-tls-check-server-identity.js @@ -34,6 +34,14 @@ var tests = [ // No wildcards in CN { host: 'b.a.com', cert: { subject: { CN: '*.a.com' } }, result: false }, + // Multiple CN fields + { + host: 'foo.com', cert: { + subject: { CN: ['foo.com', 'bar.com'] } // CN=foo.com; CN=bar.com; + }, + result: true + }, + // DNS names and CN { host: 'a.com', cert: { |