Skip to content

Fix NoHostnameTlsVerifier for rustls 0.23.24 and above#3861

Merged
abonander merged 1 commit into
transact-rs:mainfrom
elichai:rustls-0.23.24
Jul 2, 2025
Merged

Fix NoHostnameTlsVerifier for rustls 0.23.24 and above#3861
abonander merged 1 commit into
transact-rs:mainfrom
elichai:rustls-0.23.24

Conversation

@elichai

@elichai elichai commented May 15, 2025

Copy link
Copy Markdown
Contributor

From Rustls 0.23.24 release:

New feature: More detailed and helpful error reporting for common certificate errors, such as name mismatches and certificate expiry. Users who std::fmt::Display the rustls Error type will take advantage of this automatically. Users handling CertificateError variants individually should note the new variants, such as CertificateError::NotValidForNameContext (compare CertificateError::NotValidForName).

This fixes the NoHostnameTlsVerifier by also matching on this new variant.

Fixes #3793

@abonander

Copy link
Copy Markdown
Collaborator

@elichai can you rebase, please? I think I fixed the error by generating new certificates in #3914.

@elichai

elichai commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

@elichai can you rebase, please? I think I fixed the error by generating new certificates in #3914.

Done :)

@abonander abonander merged commit 2970559 into transact-rs:main Jul 2, 2025
84 checks passed
@elichai elichai deleted the rustls-0.23.24 branch October 6, 2025 09:46
@elichai

elichai commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

Any chance we can get this into a release? @abonander
Thanks!!

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.

NoHostnameTlsVerifier does not work with rustls v0.23.24 or later

2 participants