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

[iaik-jce] Defining ASN.1 Types



Hi,

I just started working with the ASN.1 package of IAIK and I suppose I need 
some help in understanding how complex ASN1 types are defined, so that I 
can use them correctly.

The situation.

I have a DER encoding that uses application-specific tags. If I decode this 
with the DerCoder I get an unknown ASN1Object. So I have to define and 
register a new ASN1 type.

in detail:

ASN.1

Person::= [APPLICATION 1] SEQUENCE{
     id [APPLICATION 15] OCTET STRING,
     name [APPLICATION 16] UTF8String OPTIONAL,
     .....}

It is no problem to define Person as APPLICATION-type with the correct tag. 
For this I only have extended the class SEQUENCE and set the new asnType. 
That works well.

Now my question:

Is it possible to define the specific structure of 'Person' (not only that 
it is a SEQUENCE)? That means: can I pass the task of checking the 
structure of the 'Person' object to the decoder or do I have to do this myself?

Thanks.

Kind regards
Gunnar Osterode
      

--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce