fix(node_crypto): prefer SAN in X509Certificate.checkHost#36250
Open
nathanwhit wants to merge 1 commit into
Open
fix(node_crypto): prefer SAN in X509Certificate.checkHost#36250nathanwhit wants to merge 1 commit into
nathanwhit wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Details
The compatibility implementation checked the subject common name before DNS subject alternative names and returned the caller's input rather than the certificate name that matched. This updates the host-check path to evaluate DNS subject alternative names first, apply the configured subject and wildcard policies, and return the matched certificate name. IP subject alternative names continue to be handled by
checkIP().Tests
./tools/format.js --checkcargo clippy -p deno_node_crypto --all-targets -- -D warningscargo test -p deno_node_crypto --libcargo build --bin denocargo build -p test_servercargo test -p unit_node_tests --test unit_node -- unit_node::crypto::crypto_key_test --nocapture