From 589481e4371c92acdedf4e68af0412b45f3f6f62 Mon Sep 17 00:00:00 2001 From: Cedric Staub Date: Thu, 11 May 2017 10:24:35 -0700 Subject: [PATCH] Add user id OID in lib/oids --- lib/oids.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/oids.go b/lib/oids.go index 1512364..62383cd 100644 --- a/lib/oids.go +++ b/lib/oids.go @@ -15,18 +15,19 @@ func describeOid(oid asn1.ObjectIdentifier) OidDescription { raw := oid.String() // Multiple should be true for any types that are []string in x509.pkix.Name. When in doubt, set it to true. names := map[string]OidDescription{ - "2.5.4.3": {"CommonName", "CN", "common_name", false}, - "2.5.4.5": {"EV Incorporation Registration Number", "", "ev_registration_number", false}, - "2.5.4.6": {"Country", "C", "country", true}, - "2.5.4.7": {"Locality", "L", "locality", true}, - "2.5.4.8": {"Province", "ST", "province", true}, - "2.5.4.10": {"Organization", "O", "organization", true}, - "2.5.4.11": {"Organizational Unit", "OU", "organizational_unit", true}, - "2.5.4.15": {"Business Category", "", "business_category", true}, - "1.2.840.113549.1.9.1": {"Email Address", "", "email_address", true}, - "1.3.6.1.4.1.311.60.2.1.1": {"EV Incorporation Locality", "", "ev_locality", true}, - "1.3.6.1.4.1.311.60.2.1.2": {"EV Incorporation Province", "", "ev_province", true}, - "1.3.6.1.4.1.311.60.2.1.3": {"EV Incorporation Country", "", "ev_country", true}, + "2.5.4.3": {"CommonName", "CN", "common_name", false}, + "2.5.4.5": {"EV Incorporation Registration Number", "", "ev_registration_number", false}, + "2.5.4.6": {"Country", "C", "country", true}, + "2.5.4.7": {"Locality", "L", "locality", true}, + "2.5.4.8": {"Province", "ST", "province", true}, + "2.5.4.10": {"Organization", "O", "organization", true}, + "2.5.4.11": {"Organizational Unit", "OU", "organizational_unit", true}, + "2.5.4.15": {"Business Category", "", "business_category", true}, + "1.2.840.113549.1.9.1": {"Email Address", "", "email_address", true}, + "1.3.6.1.4.1.311.60.2.1.1": {"EV Incorporation Locality", "", "ev_locality", true}, + "1.3.6.1.4.1.311.60.2.1.2": {"EV Incorporation Province", "", "ev_province", true}, + "1.3.6.1.4.1.311.60.2.1.3": {"EV Incorporation Country", "", "ev_country", true}, + "0.9.2342.19200300.100.1.1": {"User ID", "UID", "user_id", true}, } if description, ok := names[raw]; ok { return description