Uh oh!
There was an error while loading. Please reload this page.
x509-cert: provide parsing profiles - #987
Conversation
Uh oh!
There was an error while loading. Please reload this page.
93b81ca to
a540a6eCompareUh oh!
There was an error while loading. Please reload this page.
a540a6e to
e4c3332CompareUh oh!
There was an error while loading. Please reload this page.
454ff34 to
44a083eComparetarcieri
commented
Apr 18, 2023
@baloo this needs a rebase |
41d768e to
b1f6b80CompareUh oh!
There was an error while loading. Please reload this page.
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>, } ```
tarcieri
commented
Apr 18, 2023
Let me take a stab at |
b1f6b80 to
2f97707CompareYeah, I was focusing on providing a That works, I also needed |
2f97707 to
b1b6b73Comparetarcieri
commented
Apr 19, 2023
Hmm, so #1012 didn't fix the issue? Does it pass locally? |
tarcieri
commented
Apr 19, 2023
This one is a straight up test failure: https://github.com/RustCrypto/formats/actions/runs/4736068365/jobs/8427760079?pr=987 |
baloo
commented
Apr 19, 2023
yes, I deleted my previous comment and trying to figure out what is happening right now. |
baloo
commented
Apr 19, 2023
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
a122967Comparetarcieri
commented
Apr 19, 2023
@baloo aah yeah, to properly handle generics it should probably be using |
a122967 to
f9da73aComparebaloo
commented
Apr 19, 2023
@tarcieri injecting a default lifetime with |
65934e7 to
160cacaComparec8455df to
cb74b24Comparebaloo
commented
Apr 20, 2023
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: |
tarcieri
commented
Apr 20, 2023
Oof, that seems bad. That's another argument for keeping the generic parameters off every type except |
lumag
commented
Apr 20, 2023
Exporting the |
tarcieri
commented
Apr 20, 2023
yes, albeit a bit ugly to have |
lumag
commented
Apr 20, 2023
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 ( |
baloo
commented
Apr 20, 2023
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)
FixesRustCrypto#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