asn1_decode_simple_der doesn't accept empty OCTET STRING
Description of problem:
While asn1_encode_simple_der
seems to handle empty input, the result cannot be decoded with asn1_decode_simple_der
, yielding DER_ERROR.
Version of libtasn1 used:
libtasn1-4.19.0-3.fc39.x86_64
Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)
Fedora
How reproducible:
Steps to Reproduce:
- compile a test program, with:
gcc -o test-empty-octet-string test-empty-octet-string.c `pkg-config libtasn1 --cflags --libs`
- run it
Actual results:
non-empty: succeeded
empty: failed: DER_ERROR
Expected results:
non-empty: succeeded
empty: succeeded