[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about encoding GeneralName



hemma prafullchandra writes:
> Should the encoding of SubjectAlternativeName (Seq of GeneralName)
> be as:
> 
> 30 40 (seq, len=64)
>      A1 13 (context-specific 1, form=constructed, rfc822Name)
>           16 11 (ia5string, len=17)
>                64 75 6B 65 40 6A 61 76 61 73
>                6F 66 74 2E 63 6F 6D     (duke@javasoft.com)
>      A2 0E (context-specific 2, form=constructed, dnsName)
>           16 0C
>                6A 61 76 61 73 6F 66 74 2E 63
>                6F 6D                    (javasoft.com)
>      A6 19 (context-specific 6, form=constructed, URI)
>           16 17
>                68 74 74 70 3A 2F 2F 77 77 77
>                2E 6A 61 76 61 73 6F 66 74 2E
>                63 6F 6D                 (http://www.javasoft.com)
> 
> This is similar to the encoding provided in the example in part I.
> 
> OR should it be as:
> 30 3A (seq, len=58)
>      81 11 == 17 (context-specific 1, form=primitive, implicit tagging for
> rfc822Name)
>           64 75 6B 65 40 6A 61 76 61 73
>           6F 66 74 2E 63 6F 6D
>      82 0C == 12
>           6A 61 76 61 73 6F 66 74 2E 63
>           6F 6D
>      86 17 == 23
>           68 74 74 70 3A 2F 2F 77 77 77
>           2E 6A 61 76 61 73 6F 66 74 2E
>           63 6F 6D
> 
> Question: should implicit tagging be ignored with CHOICE type as in
> GeneralName ?
> 
> 
> Thanks, Hemma

Yes.  IMPLICIT tagging of CHOICE is not legal.  It's promoted to EXPLICIT
so that the underlying tag (which shows you what is chosen) is present
in the encoding.

brian
briank@terisa.com