diff options
author | Tobias Nießen <tniessen@tnie.de> | 2022-01-19 22:05:53 +0300 |
---|---|---|
committer | Filip Skokan <panva.ip@gmail.com> | 2022-01-22 20:36:47 +0300 |
commit | 18365d8ee6a5fdeb8b46d1a0ec9b954d61ebca7e (patch) | |
tree | 04e278c7475e9cc4b0e55519b951f8a7bf54f5d5 /test | |
parent | 5aa401050388ecacc2d009f7c504b83bb3dad324 (diff) |
crypto: change default check(Host|Email) behavior
This changes the default behavior of the X509Certificate functions
checkHost and checkEmail to match the default behavior of OpenSSL's
X509_check_host and X509_check_email functions, respectively, which
is also what RFC 2818 mandates for HTTPS.
Refs: https://github.com/nodejs/node/pull/36804
Refs: https://github.com/nodejs/node/pull/41569
PR-URL: https://github.com/nodejs/node/pull/41600
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-x509-escaping.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-x509-escaping.js b/test/parallel/test-x509-escaping.js index 58524e06a6e..3f534cfa168 100644 --- a/test/parallel/test-x509-escaping.js +++ b/test/parallel/test-x509-escaping.js @@ -425,7 +425,7 @@ const { hasOpenSSL3 } = common; assert.strictEqual(certX509.subjectAltName, 'DNS:evil.example.com'); // The newer X509Certificate API allows customizing this behavior: - assert.strictEqual(certX509.checkHost(servername), servername); + assert.strictEqual(certX509.checkHost(servername), undefined); assert.strictEqual(certX509.checkHost(servername, { subject: 'default' }), undefined); assert.strictEqual(certX509.checkHost(servername, { subject: 'always' }), |