Yeah, I've come across this also.  It seems that a CHOICE within a CHOICE is
encoded with an explicit tag even if it is in an implicit tag module.  I
guess this is to avoid the ambiguity that you mention.

Steven

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, 25 September 2001 12:27 PM
To: [EMAIL PROTECTED]
Subject: Enconding of General Name and related


The General Name is defined in RFC 2459 as
GeneralName ::= CHOICE {
     otherName                       [0]     AnotherName,
     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 }
in a module with IMPLICIT encoding.
I checked the implementation in v3_genn.c and seems to me that all the
alternatives
are encoded with the IMPLICIT tagging with the notable exception of
the option directoryName that is encoded as with EXPLICIT tagging.
What is the reason ? It is related to the definition of Name
that is in the ASN.1 module with EXPLICIT tagging in the same RFC ?

Moreover in the RFC 3161 I found the following definition
tsa  [0] GeneralName          OPTIONAL,
in a module that seems to me
with IMPLICIT tagging. Therefore I have this doubt: when I encode this value
if I use IMPLICIT tagging I'm modifying the tagging of the encoding of the
previous
 CHOICE whit the (possible) conseguence of having an ambiguous encoding.
Is this correct or am I missing some important points ?

Thanks in advance for any suggestion and/or help,
MD






__________________________________________________________________
Abbonati a Tiscali!
Con VoceViva puoi anche ascoltare ed inviare email al telefono.
Chiama VoceViva all' 892 800        http://voceviva.tiscali.it




______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to