]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added support for EV certificate attributes.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 29 May 2010 10:43:24 +0000 (12:43 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 3 Jun 2010 17:54:58 +0000 (19:54 +0200)
lib/pkix.asn
lib/pkix_asn1_tab.c
lib/x509/common.c

index e105aae107ac850c99d2718b4b09844ed7ae2f18..e10cae3561289d8a155a1aab747270bd11927534 100644 (file)
@@ -190,6 +190,7 @@ X520CommonName  ::=      DirectoryString
 id-at-localityName      AttributeType   ::=     {id-at 7}
 X520LocalityName ::= DirectoryString
 
+
 id-at-stateOrProvinceName       AttributeType   ::=     {id-at 8}
 X520StateOrProvinceName         ::= DirectoryString
 
@@ -205,6 +206,9 @@ X520Title ::=   DirectoryString
 id-at-description     AttributeType   ::=     {id-at 13}
 X520Description ::=   DirectoryString
 
+id-at-businessCategory AttributeType ::=     {id-at 15}
+businessCategory ::= DirectoryString
+
 id-at-dnQualifier       AttributeType   ::=     {id-at 46}
 X520dnQualifier ::=     PrintableString
 
@@ -220,6 +224,15 @@ X520telephoneNumber ::=     PrintableString
 id-at-facsimileTelephoneNumber       AttributeType   ::=     {id-at 23}
 X520facsimileTelephoneNumber ::=     PrintableString
 
+id-at-jurisdictionOfIncorporationLocalityName      AttributeType   ::=     {1 3 6 1 4 1 311 60 2 1 1}
+EV_jurisdictionOfIncorporationLocalityName ::= X520LocalityName
+
+id-at-jurisdictionOfIncorporationStateOrProvinceName      AttributeType   ::=     {1 3 6 1 4 1 311 60 2 1 2}
+EV_jurisdictionOfIncorporationStateOrProvinceName ::= X520StateOrProvinceName
+
+id-at-jurisdictionOfIncorporationCountryName      AttributeType   ::=     {1 3 6 1 4 1 311 60 2 1 3}
+EV_jurisdictionOfIncorporationCountryName ::= X520countryName
+
 id-at-pseudonym         AttributeType   ::=     {id-at 65}
 X520pseudonym ::=       DirectoryString
 
@@ -667,4 +680,5 @@ id-on-xmppAddr  OBJECT IDENTIFIER ::= { id-pkix 8 5 }
 
 XmppAddr ::= UTF8String
 
+
 END
index e1296d0e43d598bbba18c941396ff3f928f78727..cdd8604f45386b8a388504ae5fd224bcb4ee480c 100644 (file)
@@ -171,6 +171,10 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { NULL, 1073741825, "id-at"},
   { NULL, 1, "13"},
   { "X520Description", 1073741826, "DirectoryString"},
+  { "id-at-businessCategory", 1880096780, "AttributeType"},
+  { NULL, 1073741825, "id-at"},
+  { NULL, 1, "15"},
+  { "businessCategory", 1073741826, "DirectoryString"},
   { "id-at-dnQualifier", 1880096780, "AttributeType"},
   { NULL, 1073741825, "id-at"},
   { NULL, 1, "46"},
@@ -192,6 +196,45 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
   { NULL, 1073741825, "id-at"},
   { NULL, 1, "23"},
   { "X520facsimileTelephoneNumber", 1073741826, "PrintableString"},
+  { "id-at-jurisdictionOfIncorporationLocalityName", 1880096780, "AttributeType"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "3"},
+  { NULL, 1073741825, "6"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "4"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "311"},
+  { NULL, 1073741825, "60"},
+  { NULL, 1073741825, "2"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1, "1"},
+  { "EV_jurisdictionOfIncorporationLocalityName", 1073741826, "X520LocalityName"},
+  { "id-at-jurisdictionOfIncorporationStateOrProvinceName", 1880096780, "AttributeType"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "3"},
+  { NULL, 1073741825, "6"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "4"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "311"},
+  { NULL, 1073741825, "60"},
+  { NULL, 1073741825, "2"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1, "2"},
+  { "EV_jurisdictionOfIncorporationStateOrProvinceName", 1073741826, "X520StateOrProvinceName"},
+  { "id-at-jurisdictionOfIncorporationCountryName", 1880096780, "AttributeType"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "3"},
+  { NULL, 1073741825, "6"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "4"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1073741825, "311"},
+  { NULL, 1073741825, "60"},
+  { NULL, 1073741825, "2"},
+  { NULL, 1073741825, "1"},
+  { NULL, 1, "3"},
+  { "EV_jurisdictionOfIncorporationCountryName", 1073741826, "X520countryName"},
   { "id-at-pseudonym", 1880096780, "AttributeType"},
   { NULL, 1073741825, "id-at"},
   { NULL, 1, "65"},
index b3bea0e4d9031eb34cf063b3c75d20660383ea3d..cf62f488a167c30dc32f93b1a4fa784c12385adc 100644 (file)
@@ -46,6 +46,7 @@ struct oid2string
 
 /* This list contains all the OIDs that may be
  * contained in a rdnSequence and are printable.
+ * This must also be defined in pkix.asn.
  */
 static const struct oid2string _oid2str[] = {
   /* PKIX
@@ -75,10 +76,17 @@ static const struct oid2string _oid2str[] = {
   {"2.5.4.46", "dnQualifier", 0, 1},
   {"2.5.4.17", "postalCode", 1, 1},
   {"2.5.4.41", "Name", 1, 1},
+  {"2.5.4.15", "businessCategory", 1, 1},
 
   {"0.9.2342.19200300.100.1.25", "DC", 0, 1},
   {"0.9.2342.19200300.100.1.1", "UID", 1, 1},
 
+  /* Extended validation
+   */
+  {"1.3.6.1.4.1.311.60.2.1.1", "jurisdictionOfIncorporationLocalityName", 1, 1},
+  {"1.3.6.1.4.1.311.60.2.1.2", "jurisdictionOfIncorporationStateOrProvinceName", 1, 1},
+  {"1.3.6.1.4.1.311.60.2.1.3", "jurisdictionOfIncorporationCountryName", 0, 1},
+
   /* PKCS #9
    */
   {"1.2.840.113549.1.9.1", "EMAIL", 0, 1},