formats
formats copied to clipboard
Cryptography-related format encoders/decoders: DER, PEM, PKCS, PKIX
`AnyRef`, that allocates as `Any` with `alloc` feature
This is used to add countersignatures/timestamps to a SignerInfo. Countersignatures are attached as unsigned attributes after the signature is emitted (input to the countersignature is the signature itself).
`Length` is currently a newtype of `u32`. This is because the `Decode` and `Encode` impls are specialized to 32-bit integers: - decode: https://github.com/RustCrypto/formats/blob/bd84063/der/src/length.rs#L272-L273 - encode: https://github.com/RustCrypto/formats/blob/bd84063/der/src/length.rs#L309-L315 If the implementation could...
This PR moves `read_nested` out of `pub(crate) fn read_value`. Such trait function allows us to disable `read_nested` selectively for some primitive types, like `OctetStringRef`.
TLDR: Second assertion in the following code fails. ```rust fn main() { let now_tai = tai64::Tai64::now(); let now_std = std::time::SystemTime::now(); // making sure the second didn't change between measurements assert_eq!(now_tai,...
Depends on #1980 ```rust #[derive(Sequence)] pub struct OidAndImplicitSequence, } ```
Partially fixes - #1745 Derive macro support in future PR.
Note: I think it would be better for `SliceReader::read_nested` to return errors with relative ``` ErrorKind::Incomplete { expected_len: 3, actual_len: 2 }, ``` instead of absolute: ``` ErrorKind::Incomplete { expected_len:...