node/test/fixtures/keys
Tobias Nießen b11b4cc69d
tls: drop support for URI alternative names
Previously, Node.js incorrectly accepted uniformResourceIdentifier (URI)
subject alternative names in checkServerIdentity regardless of the
application protocol. This was incorrect even in the most common cases.
For example, RFC 2818 specifies (and RFC 6125 confirms) that HTTP over
TLS only uses dNSName and iPAddress subject alternative names, but not
uniformResourceIdentifier subject alternative names.

Additionally, name constrained certificate authorities might not be
constrained to specific URIs, allowing them to issue certificates for
URIs that specify hosts that they would not be allowed to issue dNSName
certificates for.

Even for application protocols that make use of URI subject alternative
names (such as SIP, see RFC 5922), Node.js did not implement the
required checks correctly, for example, because checkServerIdentity
ignores the URI scheme.

As a side effect, this also fixes an edge case. When a hostname is not
an IP address and no dNSName subject alternative name exists, the
subject's Common Name should be considered even when an iPAddress
subject alternative name exists.

It remains possible for users to pass a custom checkServerIdentity
function to the TLS implementation in order to implement custom identity
verification logic.

This addresses CVE-2021-44531.

Co-authored-by: Akshay K <iit.akshay@gmail.com>
CVE-ID: CVE-2021-44531
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/303
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-08 00:38:54 +00:00
..
fake-startcom-root-issued-certs
selfsigned-no-keycertsign
.gitattributes
agent1-cert.pem
agent1-csr.pem
agent1-key.pem
agent1.cnf
agent1.pfx
agent2-cert.pem
agent2-csr.pem
agent2-key.pem
agent2.cnf
agent3-cert.pem
agent3-csr.pem
agent3-key.pem
agent3.cnf
agent4-cert.pem
agent4-csr.pem
agent4-key.pem
agent4.cnf
agent5-cert.pem
agent5-csr.pem
agent5-key.pem
agent5.cnf
agent6-cert.pem
agent6-csr.pem
agent6-key.pem
agent6.cnf
agent6.pfx
agent7-cert.pem
agent7-csr.pem
agent7-key.pem
agent7.cnf
agent8-cert.pem
agent8-csr.pem
agent8-key.pem
agent8.cnf
agent9-cert.pem
agent9-csr.pem
agent9-key.pem
agent9.cnf
agent10-cert.pem
agent10-csr.pem
agent10-key.pem
agent10.cnf
agent10.pfx
ca1-cert.pem
ca1-cert.srl
ca1-key.pem
ca1.cnf
ca2-cert.pem
ca2-cert.srl
ca2-crl.pem
ca2-database.txt
ca2-database.txt.attr
ca2-database.txt.attr.old
ca2-database.txt.old
ca2-key.pem
ca2-serial
ca2.cnf
ca3-cert.pem
ca3-cert.srl
ca3-csr.pem
ca3-key.pem
ca3.cnf
ca4-cert.pem
ca4-cert.srl
ca4-csr.pem
ca4-key.pem
ca4.cnf
ca5-cert.pem
ca5-cert.srl
ca5-csr.pem
ca5-key.pem
ca5.cnf
ca6-cert.pem
ca6-cert.srl
ca6-csr.pem
ca6-key.pem
ca6.cnf
dh512.pem
dh1024.pem
dh2048.pem
dherror.pem
dns-cert1.cnf
dsa1025.pem
dsa_params.pem
dsa_private.pem
dsa_private_1025.pem
dsa_private_encrypted.pem
dsa_private_encrypted_1025.pem
dsa_private_pkcs8.pem
dsa_public.pem
dsa_public_1025.pem
ec-cert.pem
ec-csr.pem
ec-key.pem
ec.cnf
ec.pfx
ec10-cert.pem
ec10-csr.pem
ec10-key.pem
ec10.pfx
ec_p256_private.pem
ec_p256_public.pem
ec_p384_private.pem
ec_p384_public.pem
ec_p521_private.pem
ec_p521_public.pem
ec_secp256k1_private.pem
ec_secp256k1_public.pem
ed448_private.pem
ed448_public.pem
ed25519_private.pem
ed25519_public.pem
fake-cnnic-root-cert.pem
fake-cnnic-root-cert.srl
fake-cnnic-root-key.pem
fake-cnnic-root.cnf
fake-startcom-root-cert.pem
fake-startcom-root-database.txt
fake-startcom-root-database.txt.attr
fake-startcom-root-database.txt.attr.old
fake-startcom-root-database.txt.old
fake-startcom-root-key.pem
fake-startcom-root-serial
fake-startcom-root-serial.old
fake-startcom-root.cnf
I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256
incorrect_san_correct_subject-cert.pem crypto,tls: implement safe x509 GeneralName format 2022-01-08 00:38:18 +00:00
incorrect_san_correct_subject-key.pem crypto,tls: implement safe x509 GeneralName format 2022-01-08 00:38:18 +00:00
irrelevant_san_correct_subject-cert.pem tls: drop support for URI alternative names 2022-01-08 00:38:54 +00:00
irrelevant_san_correct_subject-key.pem tls: drop support for URI alternative names 2022-01-08 00:38:54 +00:00
Makefile tls: drop support for URI alternative names 2022-01-08 00:38:54 +00:00
rsa_ca.crt
rsa_cert.cnf
rsa_cert.crt
rsa_cert.pfx
rsa_cert_foafssl_b.cnf
rsa_cert_foafssl_b.crt
rsa_cert_foafssl_b.exponent
rsa_cert_foafssl_b.modulus
rsa_private.pem
rsa_private_1024.pem
rsa_private_2048.pem
rsa_private_4096.pem
rsa_private_b.pem
rsa_private_encrypted.pem
rsa_private_pkcs8.pem
rsa_private_pkcs8_bad.pem
rsa_pss_private_2048.pem
rsa_pss_private_2048_sha1_sha1_20.pem crypto: add RSA-PSS params to asymmetricKeyDetails 2021-08-29 20:23:18 +02:00
rsa_pss_private_2048_sha256_sha256_16.pem
rsa_pss_private_2048_sha512_sha256_20.pem
rsa_pss_public_2048.pem
rsa_pss_public_2048_sha1_sha1_20.pem crypto: add RSA-PSS params to asymmetricKeyDetails 2021-08-29 20:23:18 +02:00
rsa_pss_public_2048_sha256_sha256_16.pem
rsa_pss_public_2048_sha512_sha256_20.pem
rsa_public.pem
rsa_public_1024.pem
rsa_public_2048.pem
rsa_public_4096.pem
rsa_public_b.pem
rsa_public_sha1_signature_signedby_rsa_private.sha1
rsa_public_sha1_signature_signedby_rsa_private_pkcs8.sha1
rsa_spkac.spkac
rsa_spkac_invalid.spkac
x448_private.pem
x448_public.pem
x25519_private.pem
x25519_public.pem