Bug fix release, update recommended
-
Fix #63:
get_hex()did not NUL-terminate its output; zero-length
OCTET STRING or BIT STRING attributes left the buffer entirely uninitialised, causing undefined behaviour on any downstream
strlen()or pointer access. Fixed by writing'\0'after the loop and increasing theRenewallocation fromlength*4to
length*4+1at both call sites. Merged via PR #65. -
Fix:
CertBag.certValueencoding — certificate DER bytes are now correctly wrapped in an OCTET STRING as required by RFC 7292. -
Test: add regression test
t/pkcs12-info-zero-length-attributes.tcovering zero-length OCTET STRING and BIT STRING bag attributes. -
Build: add
Convert::ASN1as adevelopdependency (used by the fixture generation scriptscripts/generate-zero-length-attr-fixture.pl).