Andre Zepezauer wrote: > Hello, > > anyone with good knowledge of ASN.1 out there? The point is, that in my > opinion the current encoding of TokenInfo.lastUpdate is wrong. It is of > type CHOICE and therefore EXPLICIT tagging has to be used. CHOICE is > always tagged EXPLICIT. Correct? > > DEFINITIONS IMPLICIT TAGS ::= > > TokenInfo ::= SEQUENCE { > ... > lastUpdate [5] LastUpdate OPTIONAL > ... > } > > LastUpdate ::= CHOICE { > generalizedTime GeneralizedTime > ... > } > > First example is the kind of TokenInfo produced by OpenSC since r2466 > [1]. Second one uses EXPLICIT tagging instead. See offset 2E and > onwards: > > 00000000: 30 3D 02 01 00 04 06 56 71 90 0A 1A 13 0C 0E 4F |0=.....Vq......O| > 00000010: 70 65 6E 53 43 20 50 72 6F 6A 65 63 74 80 0B 4F |penSC Project..O| > 00000020: 70 65 6E 53 43 20 43 61 72 64 03 02 04 10 85 0F |penSC Card......| > 00000030: 32 30 31 30 31 30 31 38 30 30 33 33 30 37 5A |20101018003307Z| > > 00000000 30 3f 02 01 00 04 06 56 71 90 0a 15 13 0c 0e 4f |0?.....Vq......O| > 00000010 70 65 6e 53 43 20 50 72 6f 6a 65 63 74 80 0b 4f |penSC Project..O| > 00000020 70 65 6e 53 43 20 43 61 72 64 03 02 04 10 a5 11 |penSC Card......| > 00000030 18 0f 32 30 31 30 31 30 31 37 30 36 33 36 32 36 |..20101017063626| > 00000040 5a |Z| > > It would be nice, if someone could confirm or reject that issue. >
Without pretension to be an ASN1 expert - you have a reason. > [1] http://www.opensc-project.org/opensc/changeset/2466/ > > Kind Regards > Andre Zepezauer > > _______________________________________________ > opensc-devel mailing list > opensc-devel@lists.opensc-project.org > http://www.opensc-project.org/mailman/listinfo/opensc-devel > > -- Viktor Tarasov <viktor.tara...@opentrust.com> _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel