ietf-smime
[Top] [All Lists]

Re: Tag type for rfc822name -Reply

1998-02-03 09:11:24
On Tue, 3 Feb 1998, Darren Harter wrote:

Response B:

That is an example of where the "gotcha" rule on IMPLICIT tagging
applies :-)

X.680 section 28.6:

 The tagging construction specifies explict tagging if any of the
 following holds:
   a) ..
   b) ..
   c) the "Tag Type" alternative is used an the value of TagDefault for
      the module is "IMPLICIT TAGS" or "AUTOMATIC TAGS", but the type
      defined by "Type" is a choice type, open type, or a
DummyReference.
so even in an IMPLICIT TAGS module, GeneralName (a CHOICE) is encoded
using explicit tagging, as shown in the PKIX-1 example.

GeneralName is not explicitly tagged unless it is used within another
structure and is optional in its usage (i.e. if it is OPTIONAL, a CHOICE
element, or a SET element).

Right.  

e.g.
Test ::= SEQUENCE {
 genName [0] IMPLICIT GeneralName OPTIONAL }

This example violates X.680 clause 28.8, (X.208 clause 26.10) which says
that you cannot use IMPLICIT when tagging a CHOICE type. 

Notice that when CHOICE types and open types are defined as tagged types
(such as in the example above) they are always explicitly tagged. Further,
any reference to them must include a tag if the tagging would otherwise be
ambiguous.  Since in the above example GeneralName, though OPTIONAL,
cannot be confused with any other type, the [0] tag is not required.
 
The important thing to note in this is that the EXPLCIT for CHOICE rule
is not recursive, so the  rfc822Name in GeneralName is NOT explcitly
tagged.

I am not sure what is meant by "not recursive", but the conclusion is
correct.
 
But what does X.208 say?

It says the same thing as X.680,

--------------------------------------------------------------------------
Bancroft Scott                                Toll Free    :1-888-OSS-ASN1
Open Systems Solutions, Inc.                  International:1-609-987-9073
baos(_at_)oss(_dot_)com                                  Tech Support 
:1-732-249-5107
http://www.oss.com                            Fax          :1-732-249-4636


<Prev in Thread] Current Thread [Next in Thread>