[gnutls-devel] libtasn1 | GENERIC_ERROR returned on asn1_der_coding method (#5)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Aug 21 03:07:24 CEST 2018


New Issue was created.

Issue 5: https://gitlab.com/gnutls/libtasn1/issues/5
Author:    Flo
Assignee:  

## Description of problem:
GENERIC_ERROR (error code 6) returned on asn1_der_coding method

## Version of libtasn1 used:
1.4.13

## Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)
https://www.gnu.org/software/libtasn1/

## How reproducible: Always

Steps to Reproduce:

 * one

ingest the following schema with asn1_parser2tree --> ASN1_SUCCESS:

```
Schema { }

DEFINITIONS IMPLICIT TAGS ::=

BEGIN

Response ::= SEQUENCE {
    a OCTET STRING (SIZE (2)),
    b BOOLEAN,
    c INTEGER,
    d INTEGER
}

END
```

 * two
populate the structure with asn1_write_value for each item, then print it with asn1_print_structure:

```
name:Schema  type:DEFINITIONS  attr:IMPLICIT,
  name:NULL  type:OBJ_ID
  name:Response  type:SEQUENCE
    name:a  type:OCT_STR  value:0100  attr:SIZE,
      name:NULL  type:SIZE  value:2  attr:1_PARAM,
    name:b  type:BOOLEAN  value:FALSE
    name:c  type:INTEGER  value:0x05
    name:d  type:INTEGER  value:0x03
```
 * three
try to generate the corresponding DER using asn1_der_coding(..., "Schema", ..., ..., ...) --> error code 6: GENERIC_ERROR

## Actual results:
GENERIC_ERROR

## Expected results:
DER encoded buffer or a meaningful error.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/libtasn1/issues/5
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/20180821/e2ed9f92/attachment.html>


More information about the Gnutls-devel mailing list