Skip to content
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

error: adapt rustls_result for upstream changes. #303

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

cpu
Copy link
Member

@cpu cpu commented Mar 22, 2023

This commit adapts the rustls_result enum based on the changes upstream. Notably the CertInvalidEncoding, CertInvalidSignatureType and CertInvalidData errors have been folded into a new CertificateError enum that we expand out into its possible variants. Similarly the CorruptMessage and CorruptMessagePayload types have been replaced by a InvalidMessage enum that we expand out.

Resolves #297.

Copy link
Member Author

@cpu cpu left a comment

Choose a reason for hiding this comment

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

@jsha Here's where I have to stop for the day. I self-reviewed to call out a couple places I know I've missed the mark. Hoping that this is a helpful start. I will iterate further tomorrow.

@cpu cpu force-pushed the cpu-297-rustls_result-update branch from 7c2b6ba to d0e4af9 Compare March 23, 2023 15:18
@cpu cpu marked this pull request as ready for review March 23, 2023 15:28
@cpu cpu force-pushed the cpu-297-rustls_result-update branch from d0e4af9 to 2f9b3d4 Compare March 23, 2023 15:29
@cpu
Copy link
Member Author

cpu commented Mar 23, 2023

@jsha I think this branch is ready for review now. The Rust parts all build/test cleanly. The remaining CI failures are from src/client.c using the old dns_name struct field that was renamed. I'll fix that in a separate PR (#305) since it's unrelated to the error work.

@cpu cpu force-pushed the cpu-297-rustls_result-update branch from 2f9b3d4 to c02b806 Compare March 23, 2023 15:41
@cpu
Copy link
Member Author

cpu commented Mar 23, 2023

cpu cpu force-pushed the cpu-297-rustls_result-update branch from 2f9b3d4 to c02b806

This was me remembering the note you left in #302 - I've rolled that InvalidDnsNameError change into this work.

@cpu cpu force-pushed the cpu-297-rustls_result-update branch from c02b806 to 96e62ba Compare March 23, 2023 16:11
@cpu
Copy link
Member Author

cpu commented Mar 23, 2023

cpu force-pushed the cpu-297-rustls_result-update branch from c02b806 to 96e62ba

Fmt fix.

@cpu cpu mentioned this pull request Mar 23, 2023
5 tasks
This commit adapts the `rustls_result` enum based on the changes
upstream. Notably the `CertInvalidEncoding`, `CertInvalidSignatureType`
and `CertInvalidData` errors have been folded into a new
`CertificateError` enum that we expand out into its possible variants.
Similarly the `CorruptMessage` and `CorruptMessagePayload` types have
been replaced by a `InvalidMessage` enum that we expand out.
@cpu cpu force-pushed the cpu-297-rustls_result-update branch from 96e62ba to fe82f27 Compare March 23, 2023 17:25
Copy link
Collaborator

@jsha jsha left a comment

Choose a reason for hiding this comment

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

Very nice! 🎉

@jsha jsha merged commit 404f390 into rustls:rustls-0.21.0 Mar 23, 2023
@cpu cpu deleted the cpu-297-rustls_result-update branch March 23, 2023 17:35
jsha pushed a commit that referenced this pull request Mar 29, 2023
This commit adapts the `rustls_result` enum based on the changes
upstream. Notably the `CertInvalidEncoding`, `CertInvalidSignatureType`
and `CertInvalidData` errors have been folded into a new
`CertificateError` enum that we expand out into its possible variants.
Similarly the `CorruptMessage` and `CorruptMessagePayload` types have
been replaced by a `InvalidMessage` enum that we expand out.
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.

2 participants