help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: asn1Decoding(1) fails to decode a CHOICE?


From: Nikos Mavrogiannopoulos
Subject: Re: asn1Decoding(1) fails to decode a CHOICE?
Date: Sat, 06 Oct 2012 14:23:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120805 Icedove/10.0.6

On 10/04/2012 08:09 AM, Ivan Shmakov wrote:

>       It seems like asn1Decoding(1) (as of 2.13 debian 2; though there
>       don't seem to be any relevant entries in the log [1] in between
>       2.13 and 2.14) fails to decode a CHOICE.  Consider, e. g.:
> 
> $ asn1Decoding \
>       <(printf %s\\n \
>             'Example { } DEFINITIONS EXPLICIT TAGS ::=' \
>             BEGIN \
>             'Foo ::= CHOICE { bar [0] INTEGER, baz [1] INTEGER }' \
>             END) \
>       <(printf '\x80\x01\x2a') \
>       Example.Foo 
> Parse: done.


Is the structure you have correct? Where is the actual integer stored?

>       Also, the documentation doesn't seem to mention on how to encode
>       a CHOICE with asn1Coding(1) [3], and just omitting the “unused”

>       element(s) leads to a failure.

I also noticed. The asn1Coding tool is pretty primitive and needs a lot
of changes to be of any use.

regards,
Nikos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]