Rewrite c2i_ASN1_BIT_STRING() using CBS.
authorjsing <jsing@openbsd.org>
Sat, 23 Apr 2022 18:56:54 +0000 (18:56 +0000)
committerjsing <jsing@openbsd.org>
Sat, 23 Apr 2022 18:56:54 +0000 (18:56 +0000)
commiteabc055742cf7c577918b94ee1a4522ed6e2ce5e
tree214c60b4b9d354d8e1fd704e490698e16195966d
parent933c93965444511915a87aeb37c3cf25c1f80bab
Rewrite c2i_ASN1_BIT_STRING() using CBS.

Also switch to freeing and allocating, rather than attempting to recycle.
While here, factor out the flags ASN1_STRING_FLAG_BITS_LEFT bit bashing
and use the name "unused bits" rather than "bits left", to be more inline
with X.690 wording.

ok inoguchi@ tb@
lib/libcrypto/asn1/a_bitstr.c