You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ensure default serial generation fits 20 bytes (#203)
By default, s/n is generated taking digest of pub-key of the
certificate.
However, if the slice number representation is a negative number, then
`write_bigint_bytes` is going to append an additional `0`-byte to ensure
the positive sign.
See:
https://github.com/qnighy/yasna.rs/blob/b7e65f9a4c317494cce2d18ea02b3d6eaaea7985/src/writer/mod.rs#L493-L495
So it is possible the bigint encoding will take 21 bytes instead of 20.
This CR sets MSB of digest to `0` to ensure encoding will take exactly
20 bytes
Co-authored-by: est31 <[email protected]>
0 commit comments