-
Notifications
You must be signed in to change notification settings - Fork 167
x509-cert: provide parsing profiles #987
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
Conversation
93b81ca to
a540a6e
Compare
a540a6e to
e4c3332
Compare
454ff34 to
44a083e
Compare
|
@baloo this needs a rebase |
41d768e to
b1f6b80
Compare
|
I guess I will need to split the |
the parsing profiles (RustCrypto#987) rely on a PhantomData field to specify the underlying profile used when parsing. This is specified like: ``` rust pub struct TbsCertificate<P: Profile = Rfc5280> { // ... #[asn1(skipped = "Default::default")] pub(crate) _profile: PhantomData<P>, } ```
|
Let me take a stab at |
b1f6b80 to
2f97707
Compare
|
Yeah, I was focusing on providing a That works, I also needed |
2f97707 to
b1b6b73
Compare
|
Hmm, so #1012 didn't fix the issue? Does it pass locally? |
|
This one is a straight up test failure: https://github.com/RustCrypto/formats/actions/runs/4736068365/jobs/8427760079?pr=987 |
|
yes, I deleted my previous comment and trying to figure out what is happening right now. |
|
Because I dropped the handling for generics in the derive at the same time as I dropped the handling for the skipped fields. |
06a53a0 to
a122967
Compare
|
@baloo aah yeah, to properly handle generics it should probably be using |
a122967 to
f9da73a
Compare
|
@tarcieri injecting a default lifetime with |
65934e7 to
160caca
Compare
c8455df to
cb74b24
Compare
|
alright so that solved that. |
Folks seems to be relying on `TbsCertificate` directly, we should avoid an API break as much as possible.
|
@baloo this now breaks building certificates: |
|
Oof, that seems bad. That's another argument for keeping the generic parameters off every type except |
|
Exporting the |
|
yes, albeit a bit ugly to have |
|
For me this is not a big problem, since I will most likely rewrite my code to use |
|
We can either revert the thing for now and rework that, or get a constructor ( |
|
or we just get rid of the phantom data there ... #1017 |
Added - Certificate builder ([RustCrypto#764]) - Support for `RandomizedSigner` in builder ([RustCrypto#1007]) - Provide parsing profiles ([RustCrypto#987]) - Support for `Time::INFINITY` ([RustCrypto#1024]) - Conversion from `std::net::IpAddr` ([RustCrypto#1035]) - `CertReq` builder ([RustCrypto#1034]) Changed - use `ErrorKind::Value` for overlength serial ([RustCrypto#988]) - Bump `hex-literal` to v0.4.1 ([RustCrypto#999]) - Builder updates ([RustCrypto#1001]) - better debug info when `zlint` isn't installed ([RustCrypto#1018]) - make SKI optional in leaf certificate ([RustCrypto#1028]) - bump rsa from 0.9.0-pre.2 to 0.9.0 ([RustCrypto#1033]) Fixed - fix `KeyUsage` bit tests ([RustCrypto#993]) - extraneous PhantomData in `TbsCertificate` ([RustCrypto#1019])
Added - Certificate builder ([RustCrypto#764]) - Support for `RandomizedSigner` in builder ([RustCrypto#1007]) - Provide parsing profiles ([RustCrypto#987]) - Support for `Time::INFINITY` ([RustCrypto#1024]) - Conversion from `std::net::IpAddr` ([RustCrypto#1035]) - `CertReq` builder ([RustCrypto#1034]) Changed - use `ErrorKind::Value` for overlength serial ([RustCrypto#988]) - Bump `hex-literal` to v0.4.1 ([RustCrypto#999]) - Builder updates ([RustCrypto#1001]) - better debug info when `zlint` isn't installed ([RustCrypto#1018]) - make SKI optional in leaf certificate ([RustCrypto#1028]) - bump rsa from 0.9.0-pre.2 to 0.9.0 ([RustCrypto#1033]) Fixed - fix `KeyUsage` bit tests ([RustCrypto#993]) - extraneous PhantomData in `TbsCertificate` ([RustCrypto#1017])
Added - Certificate builder (RustCrypto#764) - Support for `RandomizedSigner` in builder (RustCrypto#1007) - Provide parsing profiles (RustCrypto#987) - Support for `Time::INFINITY` (RustCrypto#1024) - Conversion from `std::net::IpAddr` (RustCrypto#1035) - `CertReq` builder (RustCrypto#1034) - missing extension implementations (RustCrypto#1050) - notes about `UTCTime` range being 1970-2049 (RustCrypto#1052) Changed - use `ErrorKind::Value` for overlength serial (RustCrypto#988) - Bump `hex-literal` to v0.4.1 (RustCrypto#999) - Builder updates (RustCrypto#1001) - better debug info when `zlint` isn't installed (RustCrypto#1018) - make SKI optional in leaf certificate (RustCrypto#1028) - bump rsa from 0.9.0-pre.2 to 0.9.0 (RustCrypto#1033) - bump rsa from 0.9.1 to 0.9.2 (RustCrypto#1056) Fixed - fix `KeyUsage` bit tests (RustCrypto#993) - extraneous PhantomData in `TbsCertificate` (RustCrypto#1017) - CI flakiness (RustCrypto#1042) - usage of ecdsa signer (RustCrypto#1043)
Added - Certificate builder (RustCrypto#764) - Support for `RandomizedSigner` in builder (RustCrypto#1007) - Provide parsing profiles (RustCrypto#987) - Support for `Time::INFINITY` (RustCrypto#1024) - Conversion from `std::net::IpAddr` (RustCrypto#1035) - `CertReq` builder (RustCrypto#1034) - missing extension implementations (RustCrypto#1050) - notes about `UTCTime` range being 1970-2049 (RustCrypto#1052) - consume the `SignatureBitStringEncoding` trait (RustCrypto#1048) Changed - use `ErrorKind::Value` for overlength serial (RustCrypto#988) - Bump `hex-literal` to v0.4.1 (RustCrypto#999) - Builder updates (RustCrypto#1001) - better debug info when `zlint` isn't installed (RustCrypto#1018) - make SKI optional in leaf certificate (RustCrypto#1028) - bump rsa from 0.9.0-pre.2 to 0.9.0 (RustCrypto#1033) - bump rsa from 0.9.1 to 0.9.2 (RustCrypto#1056) Fixed - fix `KeyUsage` bit tests (RustCrypto#993) - extraneous PhantomData in `TbsCertificate` (RustCrypto#1017) - CI flakiness (RustCrypto#1042) - usage of ecdsa signer (RustCrypto#1043)
Added - Certificate builder (#764) - Support for `RandomizedSigner` in builder (#1007) - Provide parsing profiles (#987) - Support for `Time::INFINITY` (#1024) - Conversion from `std::net::IpAddr` (#1035) - `CertReq` builder (#1034) - missing extension implementations (#1050) - notes about `UTCTime` range being 1970-2049 (#1052) - consume the `SignatureBitStringEncoding` trait (#1048) Changed - use `ErrorKind::Value` for overlength serial (#988) - Bump `hex-literal` to v0.4.1 (#999) - Builder updates (#1001) - better debug info when `zlint` isn't installed (#1018) - make SKI optional in leaf certificate (#1028) - bump rsa from 0.9.0-pre.2 to 0.9.0 (#1033) - bump rsa from 0.9.1 to 0.9.2 (#1056) Fixed - fix `KeyUsage` bit tests (#993) - extraneous PhantomData in `TbsCertificate` (#1017) - CI flakiness (#1042) - usage of ecdsa signer (#1043)
Fixes RustCrypto#1149 This broke with the parsing profiles (RustCrypto#987)
This commit brings the profiles introduced in RustCrypto#987 to `TrustAnchorChoice` and `Crl`. This is intended for the support of invalid certificates in https://github.com/carl-wallace/rust-pki/tree/main/certval
This commit brings the profiles introduced in RustCrypto#987 to `TrustAnchorChoice` and `Crl`. This is intended for the support of invalid certificates in https://github.com/carl-wallace/rust-pki/tree/main/certval
This commit brings the profiles introduced in RustCrypto#987 to `TrustAnchorChoice` and `Crl`. This is intended for the support of invalid certificates in https://github.com/carl-wallace/rust-pki/tree/main/certval
This commit brings the profiles introduced in RustCrypto#987 to `TrustAnchorChoice` and `Crl`. This is intended for the support of invalid certificates in https://github.com/carl-wallace/rust-pki/tree/main/certval
This commit brings the profiles introduced in #987 to `TrustAnchorChoice` and `Crl`. This is intended for the support of invalid certificates in https://github.com/carl-wallace/rust-pki/tree/main/certval
This allow the user to relax checks when parsing certificate and cover for non rfc5280 compliant x509 certificates.
Fixes #978
Fixes #984
cc @lumag