Uh oh!
There was an error while loading. Please reload this page.
der: add indefinite length - #1820
Conversation
tarcieri
commented
May 6, 2025
I've been trying to work on indefinite lengths but in a way that avoids the need to have dummy lengths or an |
dishmaker
commented
May 6, 2025
I tried a trick with |
dishmaker
commented
May 6, 2025
Because /// This enum is 4 bytesenumLengthInner{Definite(NonZero<u32>),Indefinite,} |
tarcieri
commented
May 6, 2025
@dishmaker that enum looks a lot like |
Yeah, so we need |
tarcieri
commented
May 6, 2025
@dishmaker I definitely don't want to pull in an extra dependency for that. The newtype can enforce its own maximum like it did before #1726 |
0b79ef6 to
47a1cd9Compare| #[test] | ||
| fn cms_decode_ber() { | ||
| let ber_pkcs7 = include_bytes!("../tests/examples/ber_pkcs7.bin"); |
There was a problem hiding this comment.
There's already a checked-in example: cms_ber.bin, which is what cms_der.bin is derived from
We can use
u32::MAXas indefinite variant