Where did you get the string and are you sure that the whole string is the GeneralName?
 
A0 33 A0 31 86 2F 68 74 74 70 73 3A 2F 2F 74 6F ....
 
I would translate this into:
A0 [Tag Constructed Zero] Explicit Tag
33 Length
A0 [Tag Constructed Zero] Explicit Tag
31 Length
86 [Tag Primitive Six] Explicit Tag
2F Length
68 74 74 ..... Content
 
But that only makes sense if "86 2F 68 74 74 ..." is the GeneralName (which would mean 
that this is a Uniform Resource Identifier in IA5String format) and the rest is 
defining something else? 
 
/ Fredrik Asplund

-----Original Message-----
From: Tantaoui, Omar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 1:09 PM
To: '[EMAIL PROTECTED]'
Subject: [ASN.1] Decoding tagged type inside a CHOICE



Hi everybody, 

I have the ASN.1 type: 

GeneralName ::= CHOICE { 
           otherName                       [0]     OtherName, 
           rfc822Name                      [1]     IA5String, 
           dNSName                         [2]     IA5String, 
           x400Address                     [3]     ORAddress, 
           directoryName                   [4]     Name, 
           ediPartyName                    [5]     EDIPartyName, 
           uniformResourceIdentifier       [6]     IA5String, 
           iPAddress                       [7]     OCTET STRING, 
           registeredID                    [8]     OBJECT IDENTIFIER 
} 

I have printed the DER encoding string in hexa of an occurence of this type: 
A0 33 A0 31 86 2F 68 74 74 70 73 3A 2F 2F 74 6F ... 

I am not currently able to know what type is contained in this CHOICE since I can't 
retrieve the Tag value from it. 
Someone know where is the Tag in the string above ? 

I just can say that the substring "68 74 74 70 73 3A 2F 2F 74 6F ..." is a readeable 
string when it is converted to decimal format.

Any help is welcome. 

Best regards, 

Omar Tantaoui 

Reply via email to