> 
> 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.

This is so in ASN1.

> 
> 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 ?

CHOICEs are always EXPLICIT.

Be careful with some compilers or almost-compilers, when using a syntax like

   tsa  [0] GeneralName  OPTIONAL

If the compiler does not 'know' that GeneralName is a CHOICE. 
You might need to rewrite    

   tsa  [0] EXPLICIT GeneralName OPTIONAL


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

Reply via email to