[gnutls-devel] libtasn1 | asn1_decode_simple_der doesn't accept empty OCTET STRING (#48)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Feb 9 08:08:24 CET 2024



Daiki Ueno created an issue: https://gitlab.com/gnutls/libtasn1/-/issues/48



## 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](/uploads/5f0777f0c98a2160e9657a938e357cba/test-empty-octet-string.c), with:
```console
gcc -o test-empty-octet-string test-empty-octet-string.c `pkg-config libtasn1 --cflags --libs`
```
 * run it

## Actual results:
```console
non-empty: succeeded
empty: failed: DER_ERROR
```

## Expected results:
```console
non-empty: succeeded
empty: succeeded
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/libtasn1/-/issues/48
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20240209/cad1eac5/attachment.html>


More information about the Gnutls-devel mailing list