-
Notifications
You must be signed in to change notification settings - Fork 141
Feature: Certificate policies #406
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?
Conversation
|
I'll take another look at test coverage and the pipeline checks in the coming days but wanted to get this out here since the output seems to at least be valid. |
cargo fmt --all -- --config-path .rustfmt.unstable.toml
cargo doc --features ring,pem,x509-parser --document-private-items
fd4cb64 to
64ee5b1
Compare
|
I think I'll remove the impl and replace the |
…for InhibitAnyPolicy
…cting custom policies
Ran every failed command locally
|
Suppose this is about as ready for review as it can get. There are still changes to be made but I'll need to know which direction they should go in. |
Thanks for offering to review the PR @djc
I expect you will want me to make some changes but wanted to talk about them before blindly trying to anticipate everything.
In #355 was some good justification for avoiding trait impls. Unfortunately I didn't see this until after I was almost done. I assume this concerns both
x509_parserandyasna. Would you like me toThere are some cases where I felt that there wasn't a fitting error case. I added an
Othercase as a temporary measure. They could probably be collectively classified asUserError(String)or are entirely unnecessary if it is not the libraries responsibility to enforce valid usage. Once example for these cases would be that any given Certificate Policy OID may only appear once per certificate.I also added comments about my thoughts and doubts during dev.
You requested some basic tests but I don't really know how I would do that from within the library. Serializing and deserializing the structs I just added doesn't really guarantee conformity and compatibility with external tools that are going to work with the output. So far my test was the newly added example and inspection of the output with
openssl.Adds the following extensions
This PR handles two of the extensions listed/requested in #370
In the following I just pasted the notes I took while I was trying to implement the extensions.
Requested Screenshots
OpenSSL (WSL)
cd certsopenssl x509 --in cert.pem --text --nooutWindows "Krypto-Shellerweiterungen"
Ausstellerklärung:
Unfortunately the window can't be resized
Browsers
Minimal webserver
Firefox
Chromium (Edge)
ASN.1 JavaScript decoder
Decode of a generated cert by
cargo run --example certificate_policies