crypto: change default check(Host|Email) behavior · nodejs/node@18365d8 · GitHub
Skip to content

Commit 18365d8

Browse files
tniessenpanva
authored andcommitted
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: #36804 Refs: #41569 PR-URL: #41600 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
1 parent 5aa4010 commit 18365d8

3 files changed

Lines changed: 19 additions & 14 deletions

File tree

doc/api/crypto.md

Lines changed: 17 additions & 11 deletions

lib/internal/crypto/x509.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ function isX509Certificate(value) {
6565
function getFlags(options = {}) {
6666
validateObject(options, 'options');
6767
const {
68-
// TODO(tniessen): change the default to 'default'
69-
subject = 'always', // Can be 'default', 'always', or 'never'
68+
subject = 'default', // Can be 'default', 'always', or 'never'
7069
wildcards = true,
7170
partialWildcards = true,
7271
multiLabelWildcards = false,

test/parallel/test-x509-escaping.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)