Skip to content

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Aug 14, 2025

Fixes #28903
Closes #26190

  • Adds a new option unsafelyDisableHostnameVerification 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.

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.
@littledivy littledivy mentioned this pull request Aug 15, 2025
8 tasks
*
* @default {false}
*/
disableHostnameVerification?: boolean;
Copy link
Member

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.

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed tounsafelyDisableHostnameVerification

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

@littledivy littledivy merged commit b580804 into denoland:main Aug 23, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TLS Error connecting to Azure PostgreSQL Skip hostname checking for TLS connections
3 participants