-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat: allow disable hostname verification in TLS #30409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow disable hostname verification in TLS #30409
Conversation
Fixes denoland#28903 - Adds a new option `disableHostnameVerification` to `Deno.connectTls` and `Deno.startTls` to ignore DNS name mismatch errors from rustls server verifier. - Disable hostname verification in Node.js TLSSocket if `checkServerIdentity` is a no-op.
cli/tsc/dts/lib.deno_net.d.ts
Outdated
* | ||
* @default {false} | ||
*/ | ||
disableHostnameVerification?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we name it something like unsafelyDisableHostnameVerification
? I think we should update the docstring too, to tell that this shouldn't be done by most users and when it might be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking this too. Btw, @littledivy remember to post these public api changes to the cli-public-api channel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed tounsafelyDisableHostnameVerification
Signed-off-by: Divy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
Fixes #28903
Closes #26190
unsafelyDisableHostnameVerification
toDeno.connectTls
andDeno.startTls
to ignore DNS name mismatch errors from rustls server verifier.checkServerIdentity
is a no-op.