formats
formats copied to clipboard
Cryptography-related format encoders/decoders: DER, PEM, PKCS, PKIX
Changes: - add inner newtype `UnusedBits` - calculate `bit_length` on the fly
Partial fix for: - #2062
`to_system_time` overflows if encoded timestamp can't be represented as i64 (usually)
The way `SetOfVec::insert` is implemented results in the internal structure containing an unsorted duplicate value, because it first inserts the value, and then check whether it's a dupe while simultaneously...
Basically I need to add a TSA to my CMS signature and include it into the unsigned data.
remove repetitive word in comment
Due to BER: - using `ber` features makes DER reader slow (about 20% slower) - `read_nested` now includes primitive `DecodeValue`s too (added in #1877) (partial fix in #1916) - ~indefinite...
This is a reopening of #1977 which was closed because there was too little explaination. The motivation for adding the derives is that I cannot use `SequenceRef` in my structs...
After PR: - https://github.com/RustCrypto/formats/pull/1889 most cases now return error position, but few untreated errors remain, for example: https://github.com/RustCrypto/formats/blob/3ee0028ef967b0831df6fc6338e2620ea03efd43/der/src/asn1/generalized_time.rs#L112 https://github.com/RustCrypto/formats/blob/858f3af9df8398cb456ebe05b41f82e0335e66d8/der/src/asn1/integer/uint.rs#L330 https://github.com/RustCrypto/formats/blob/858f3af9df8398cb456ebe05b41f82e0335e66d8/der/src/asn1/oid.rs#L19
Resolves #1835 I made sure it does not add any runtime overhead, even when using the `"clarify"` feature. This PR is initial support. In future I'd like to add `Sequence`...