diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-11-19 22:05:26 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-11-19 09:05:26 -0500 |
commit | 36d5cd6a14f01434d829a381eeb85752f8384dbc (patch) | |
tree | a1cb8181aa668b10ad53625b30872590b930c358 | |
parent | df203db3ab478a1262f9465d251b26ee42766e27 (diff) | |
download | cryptography-36d5cd6a14f01434d829a381eeb85752f8384dbc.tar.gz cryptography-36d5cd6a14f01434d829a381eeb85752f8384dbc.tar.bz2 cryptography-36d5cd6a14f01434d829a381eeb85752f8384dbc.zip |
add a few more OIDs (#3259)
pulled from #3244
-rw-r--r-- | docs/x509/reference.rst | 18 | ||||
-rw-r--r-- | src/cryptography/x509/oid.py | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index d3e72c0a..68e1f73c 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -2332,6 +2332,12 @@ instances. The following common OIDs are available as constants. Corresponds to the dotted string ``"2.5.4.65"``. + .. attribute:: USER_ID + + .. versionadded:: 1.6 + + Corresponds to the dotted string ``"0.9.2342.19200300.100.1.1"``. + .. attribute:: DOMAIN_COMPONENT Corresponds to the dotted string ``"0.9.2342.19200300.100.1.25"``. A string @@ -2357,6 +2363,18 @@ instances. The following common OIDs are available as constants. Corresponds to the dotted string ``"2.5.4.15"``. + .. attribute:: POSTAL_ADDRESS + + .. versionadded:: 1.6 + + Corresponds to the dotted string ``"2.5.4.16"``. + + .. attribute:: POSTAL_CODE + + .. versionadded:: 1.6 + + Corresponds to the dotted string ``"2.5.4.17"``. + .. class:: SignatureAlgorithmOID diff --git a/src/cryptography/x509/oid.py b/src/cryptography/x509/oid.py index 6890eadd..3edac72e 100644 --- a/src/cryptography/x509/oid.py +++ b/src/cryptography/x509/oid.py @@ -110,6 +110,7 @@ class NameOID(object): X500_UNIQUE_IDENTIFIER = ObjectIdentifier("2.5.4.45") DN_QUALIFIER = ObjectIdentifier("2.5.4.46") PSEUDONYM = ObjectIdentifier("2.5.4.65") + USER_ID = ObjectIdentifier("0.9.2342.19200300.100.1.1") DOMAIN_COMPONENT = ObjectIdentifier("0.9.2342.19200300.100.1.25") EMAIL_ADDRESS = ObjectIdentifier("1.2.840.113549.1.9.1") JURISDICTION_COUNTRY_NAME = ObjectIdentifier("1.3.6.1.4.1.311.60.2.1.3") @@ -118,6 +119,8 @@ class NameOID(object): "1.3.6.1.4.1.311.60.2.1.2" ) BUSINESS_CATEGORY = ObjectIdentifier("2.5.4.15") + POSTAL_ADDRESS = ObjectIdentifier("2.5.4.16") + POSTAL_CODE = ObjectIdentifier("2.5.4.17") class SignatureAlgorithmOID(object): @@ -194,6 +197,7 @@ _OID_NAMES = { NameOID.X500_UNIQUE_IDENTIFIER: "x500UniqueIdentifier", NameOID.DN_QUALIFIER: "dnQualifier", NameOID.PSEUDONYM: "pseudonym", + NameOID.USER_ID: "userID", NameOID.DOMAIN_COMPONENT: "domainComponent", NameOID.EMAIL_ADDRESS: "emailAddress", NameOID.JURISDICTION_COUNTRY_NAME: "jurisdictionCountryName", @@ -202,6 +206,8 @@ _OID_NAMES = { "jurisdictionStateOrProvinceName" ), NameOID.BUSINESS_CATEGORY: "businessCategory", + NameOID.POSTAL_ADDRESS: "postalAddress", + NameOID.POSTAL_CODE: "postalCode", SignatureAlgorithmOID.RSA_WITH_MD5: "md5WithRSAEncryption", SignatureAlgorithmOID.RSA_WITH_SHA1: "sha1WithRSAEncryption", |