-
Notifications
You must be signed in to change notification settings - Fork 133
Revise errors for CertificateSigningRequestParams::from_der #388
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
base: main
Are you sure you want to change the base?
Revise errors for CertificateSigningRequestParams::from_der #388
Conversation
334716a
to
0c9946e
Compare
rcgen/src/error.rs
Outdated
#[cfg(feature = "x509-parser")] | ||
/// Unsupported extension requested in CSR | ||
UnsupportedExtension, | ||
UnsupportedExtensionInCsr, |
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 realize this is a breaking change (hence the semver warning).
Happy to roll this part back, or move to a separate PR.
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.
Suggest you leave the old names in place, marked with #[deprecated]
with appropriate since
and note
, and add the new variants next to them (in the same commit).
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.
Rolled this back in 5fd069c and will split off.
It would be nice to better understand the motivation/use case here. |
@djc, I’m assuming the original introduction of Lines 651 to 656 in 453bcb5
where a catch-all error case of the underlying crypto library is lifted into the And later it was re-used in this case It would be clearer in code that uses this library to have error variant names that map in a self-evident way to the expected error conditions expected in parsing and verifying a CSR. Some, but not all, existing error variants include contextual hints in the name ( |
- Introduce specific error for CSR signature verification - Make error name more specific for unsupported CSR extensions
0c9946e
to
5fd069c
Compare
You still haven't really answered this question. What problem did you run into that you are trying to solve? |
Following up from