summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-05-29 12:43:24 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-05-29 12:43:34 +0200
commit395e86e38b8c16eab8dc56a10da3947bb624b1f1 (patch)
treeba4a3e2714cdb987453e7eca574daed649fbdbea
parent91f87327912d28adab2b52fb0549a134b9a2d83d (diff)
downloadgnutls-395e86e38b8c16eab8dc56a10da3947bb624b1f1.tar.gz
Added support for EV certificate attributes.
-rw-r--r--lib/pkix.asn14
-rw-r--r--lib/pkix_asn1_tab.c43
-rw-r--r--lib/x509/common.c8
3 files changed, 65 insertions, 0 deletions
diff --git a/lib/pkix.asn b/lib/pkix.asn
index e105aae107..e10cae3561 100644
--- a/lib/pkix.asn
+++ b/lib/pkix.asn
@@ -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
diff --git a/lib/pkix_asn1_tab.c b/lib/pkix_asn1_tab.c
index e1296d0e43..cdd8604f45 100644
--- a/lib/pkix_asn1_tab.c
+++ b/lib/pkix_asn1_tab.c
@@ -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"},
diff --git a/lib/x509/common.c b/lib/x509/common.c
index b3bea0e4d9..cf62f488a1 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -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},