Subject: Encoding of GeneralName choice directoryName

From: Anne Anderson <[email-masked]>
Date: Wed, 17 Jul 2002 13:31:37 -0400 (EDT)

None of the examples in RFC3280 includes a "directoryName" choice
from a GeneralName.  This particular type is of interest because
it is the only type in the GeneralName CHOICE that is itself a
CHOICE.  This means that a special clause in X.680 Section 30.6
applies: explicit tagging is used to encode a choice type, even
if the TagDefault is IMPLICIT TAGS.

Is the following correct:

A Name of "cn=Anne" has the following encoded form:
            
        [SEQUENCE] <length>
            [SET] <length>
                [SEQUENCE] <length>
                   [OBJECT IDENTIFIER] <length>
                       2.5.4.3
                   [PrintableString] <length>
                       'Anne'

so the encoding of directoryName with a value of that Name has
the following form:

      [4] <length>
        [SEQUENCE] <length>
            [SET] <length>
                [SEQUENCE] <length>
                   [OBJECT IDENTIFIER] <length>
                       2.5.4.3
                   [PrintableString] <length>
                       'Anne'

The examples in RFC3280 include GeneralName choices for URLs and
RFC822 e-mail names, and those encodings indeed are done with
IMPLICIT encoding.

Anne Anderson
-- 
Anne H. Anderson             Email: [email-masked]
Sun Microsystems Laboratories
1 Network Drive,UBUR02-311     Tel: 781/442-0928
Burlington, MA 01803-0902 USA  Fax: 781/442-1692