rusticata / asn1-rs

Parsers/Encoders for ASN.1 BER/DER data
Apache License 2.0
9 stars 14 forks source link

Fix a small math error in GeneralizedTime #17

Closed dequbed closed 2 years ago

dequbed commented 2 years ago

Generalized time has a math error that means the length calculated by it's to_der_len is off by two.

chifflier commented 2 years ago

Hi, The returned value was indeed missing the length of the header. Applied, thanks!

Note: UtcTime had the same issue, I'll fix it as well