[Top][All Lists]
[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: |
Sun, 07 Oct 2012 12:30:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120805 Icedove/10.0.6 |
On 10/06/2012 08:42 PM, Ivan Shmakov wrote:
> >> The integer is 42 decimal, or 2A hexadecimal, and it's stored as the
> >> third (and the last) octet of the sequence.
>
> > I don't see any integer there with "openssl asn1parse".
> AIUI, X.690 §8.1.2 specifies that there could only be one tag
> per value, and the CHOICE above uses “private” tags (PRIVATE 0,
> PRIVATE 1) to distinguish the members, instead of the
> “universal”, type-encoding tags (such as INTEGER = UNIVERSAL 2.)
> There isn't much choice here, actually, as the types of these
> CHOICE members just happen to coincide.
It looks like a corner case indeed. I do not know what should be the
encoding in that case. Do you have any use-case that is affected by this
behavior or it is a test example?
> > Could be but I've never needed that tool. Maybe given its
> > limitations it is a good idea to even remove it. When I need to
> > generate structures I use libtasn1 directly.
> Honestly, I'd hesitate to write C code when the task at hand
> could be accomplished with a higher-level language, such as
> Shell (or Perl), which seem to speak in favor of retaining such
> command-line tools.
> (I hope to check if these tools could be improved by some simple
> changes.)
Indeed. Would you be interested into augmenting this application? I
don't think it is hard to make it a practical tool to generate structures.
regards,
Nikos
- asn1Decoding(1) fails to decode a CHOICE?, Ivan Shmakov, 2012/10/04
- Re: asn1Decoding(1) fails to decode a CHOICE?, Nikos Mavrogiannopoulos, 2012/10/06
- Re: asn1Decoding(1) fails to decode a CHOICE?, Ivan Shmakov, 2012/10/06
- Re: asn1Decoding(1) fails to decode a CHOICE?, Nikos Mavrogiannopoulos, 2012/10/06
- Re: asn1Decoding(1) fails to decode a CHOICE?, Ivan Shmakov, 2012/10/06
- Re: asn1Decoding(1) fails to decode a CHOICE?,
Nikos Mavrogiannopoulos <=
- Re: asn1Decoding(1) fails to decode a CHOICE?, Ivan Shmakov, 2012/10/07
- Re: asn1Decoding(1) fails to decode a CHOICE?, Nikos Mavrogiannopoulos, 2012/10/07
- PRIVATE tags handling, Ivan Shmakov, 2012/10/08
- [SOLVED] PRIVATE tags handling, Ivan Shmakov, 2012/10/08
asn1Coding(1) a CHOICE, Ivan Shmakov, 2012/10/08