aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/x509
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-08-09 19:28:09 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-08-09 19:28:09 -0500
commita1584fd8baf8d636e36321d5394b77bd0afa2529 (patch)
treef6f7c9c2c299bd14c694b7de57549182cca1cebc /src/cryptography/x509
parent261dbe3a0d4bf4d5f6107392ef0831b735a6f98d (diff)
parente8e14871435a53fb582015353a3b1cb52ec97e5b (diff)
downloadcryptography-a1584fd8baf8d636e36321d5394b77bd0afa2529.tar.gz
cryptography-a1584fd8baf8d636e36321d5394b77bd0afa2529.tar.bz2
cryptography-a1584fd8baf8d636e36321d5394b77bd0afa2529.zip
Merge pull request #2239 from alex/finish-remove-duplication
Completed the removal of duplicate oids
Diffstat (limited to 'src/cryptography/x509')
-rw-r--r--src/cryptography/x509/oid.py122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/cryptography/x509/oid.py b/src/cryptography/x509/oid.py
index d29546f3..a3cc065e 100644
--- a/src/cryptography/x509/oid.py
+++ b/src/cryptography/x509/oid.py
@@ -24,7 +24,7 @@ class ObjectIdentifier(object):
def __repr__(self):
return "<ObjectIdentifier(oid={0}, name={1})>".format(
self.dotted_string,
- _OID_NAMES.get(self.dotted_string, "Unknown OID")
+ _OID_NAMES.get(self, "Unknown OID")
)
def __hash__(self):
@@ -118,64 +118,64 @@ OID_CPS_USER_NOTICE = ObjectIdentifier("1.3.6.1.5.5.7.2.2")
OID_ANY_POLICY = ObjectIdentifier("2.5.29.32.0")
_OID_NAMES = {
- OID_COMMON_NAME.dotted_string: "commonName",
- OID_COUNTRY_NAME.dotted_string: "countryName",
- OID_LOCALITY_NAME.dotted_string: "localityName",
- OID_STATE_OR_PROVINCE_NAME.dotted_string: "stateOrProvinceName",
- OID_ORGANIZATION_NAME.dotted_string: "organizationName",
- OID_ORGANIZATIONAL_UNIT_NAME.dotted_string: "organizationalUnitName",
- OID_SERIAL_NUMBER.dotted_string: "serialNumber",
- OID_SURNAME.dotted_string: "surname",
- OID_GIVEN_NAME.dotted_string: "givenName",
- OID_TITLE.dotted_string: "title",
- OID_GENERATION_QUALIFIER.dotted_string: "generationQualifier",
- OID_DN_QUALIFIER.dotted_string: "dnQualifier",
- OID_PSEUDONYM.dotted_string: "pseudonym",
- OID_DOMAIN_COMPONENT.dotted_string: "domainComponent",
- OID_EMAIL_ADDRESS.dotted_string: "emailAddress",
- OID_RSA_WITH_MD5.dotted_string: "md5WithRSAEncryption",
- OID_RSA_WITH_SHA1.dotted_string: "sha1WithRSAEncryption",
- OID_RSA_WITH_SHA224.dotted_string: "sha224WithRSAEncryption",
- OID_RSA_WITH_SHA256.dotted_string: "sha256WithRSAEncryption",
- OID_RSA_WITH_SHA384.dotted_string: "sha384WithRSAEncryption",
- OID_RSA_WITH_SHA512.dotted_string: "sha512WithRSAEncryption",
- OID_ECDSA_WITH_SHA1.dotted_string: "ecdsa-with-SHA1",
- OID_ECDSA_WITH_SHA224.dotted_string: "ecdsa-with-SHA224",
- OID_ECDSA_WITH_SHA256.dotted_string: "ecdsa-with-SHA256",
- OID_ECDSA_WITH_SHA384.dotted_string: "ecdsa-with-SHA384",
- OID_ECDSA_WITH_SHA512.dotted_string: "ecdsa-with-SHA512",
- OID_DSA_WITH_SHA1.dotted_string: "dsa-with-sha1",
- OID_DSA_WITH_SHA224.dotted_string: "dsa-with-sha224",
- OID_DSA_WITH_SHA256.dotted_string: "dsa-with-sha256",
- "1.3.6.1.5.5.7.3.1": "serverAuth",
- "1.3.6.1.5.5.7.3.2": "clientAuth",
- "1.3.6.1.5.5.7.3.3": "codeSigning",
- "1.3.6.1.5.5.7.3.4": "emailProtection",
- "1.3.6.1.5.5.7.3.8": "timeStamping",
- "1.3.6.1.5.5.7.3.9": "OCSPSigning",
- "2.5.29.9": "subjectDirectoryAttributes",
- "2.5.29.14": "subjectKeyIdentifier",
- "2.5.29.15": "keyUsage",
- "2.5.29.17": "subjectAltName",
- "2.5.29.18": "issuerAltName",
- "2.5.29.19": "basicConstraints",
- "2.5.29.21": "cRLReason",
- "2.5.29.24": "invalidityDate",
- "2.5.29.29": "certificateIssuer",
- "2.5.29.30": "nameConstraints",
- "2.5.29.31": "cRLDistributionPoints",
- "2.5.29.32": "certificatePolicies",
- "2.5.29.33": "policyMappings",
- "2.5.29.35": "authorityKeyIdentifier",
- "2.5.29.36": "policyConstraints",
- "2.5.29.37": "extendedKeyUsage",
- "2.5.29.46": "freshestCRL",
- "2.5.29.54": "inhibitAnyPolicy",
- "1.3.6.1.5.5.7.1.1": "authorityInfoAccess",
- "1.3.6.1.5.5.7.1.11": "subjectInfoAccess",
- "1.3.6.1.5.5.7.48.1.5": "OCSPNoCheck",
- "1.3.6.1.5.5.7.48.1": "OCSP",
- "1.3.6.1.5.5.7.48.2": "caIssuers",
- "1.3.6.1.5.5.7.2.1": "id-qt-cps",
- "1.3.6.1.5.5.7.2.2": "id-qt-unotice",
+ OID_COMMON_NAME: "commonName",
+ OID_COUNTRY_NAME: "countryName",
+ OID_LOCALITY_NAME: "localityName",
+ OID_STATE_OR_PROVINCE_NAME: "stateOrProvinceName",
+ OID_ORGANIZATION_NAME: "organizationName",
+ OID_ORGANIZATIONAL_UNIT_NAME: "organizationalUnitName",
+ OID_SERIAL_NUMBER: "serialNumber",
+ OID_SURNAME: "surname",
+ OID_GIVEN_NAME: "givenName",
+ OID_TITLE: "title",
+ OID_GENERATION_QUALIFIER: "generationQualifier",
+ OID_DN_QUALIFIER: "dnQualifier",
+ OID_PSEUDONYM: "pseudonym",
+ OID_DOMAIN_COMPONENT: "domainComponent",
+ OID_EMAIL_ADDRESS: "emailAddress",
+ OID_RSA_WITH_MD5: "md5WithRSAEncryption",
+ OID_RSA_WITH_SHA1: "sha1WithRSAEncryption",
+ OID_RSA_WITH_SHA224: "sha224WithRSAEncryption",
+ OID_RSA_WITH_SHA256: "sha256WithRSAEncryption",
+ OID_RSA_WITH_SHA384: "sha384WithRSAEncryption",
+ OID_RSA_WITH_SHA512: "sha512WithRSAEncryption",
+ OID_ECDSA_WITH_SHA1: "ecdsa-with-SHA1",
+ OID_ECDSA_WITH_SHA224: "ecdsa-with-SHA224",
+ OID_ECDSA_WITH_SHA256: "ecdsa-with-SHA256",
+ OID_ECDSA_WITH_SHA384: "ecdsa-with-SHA384",
+ OID_ECDSA_WITH_SHA512: "ecdsa-with-SHA512",
+ OID_DSA_WITH_SHA1: "dsa-with-sha1",
+ OID_DSA_WITH_SHA224: "dsa-with-sha224",
+ OID_DSA_WITH_SHA256: "dsa-with-sha256",
+ OID_SERVER_AUTH: "serverAuth",
+ OID_CLIENT_AUTH: "clientAuth",
+ OID_CODE_SIGNING: "codeSigning",
+ OID_EMAIL_PROTECTION: "emailProtection",
+ OID_TIME_STAMPING: "timeStamping",
+ OID_OCSP_SIGNING: "OCSPSigning",
+ OID_SUBJECT_DIRECTORY_ATTRIBUTES: "subjectDirectoryAttributes",
+ OID_SUBJECT_KEY_IDENTIFIER: "subjectKeyIdentifier",
+ OID_KEY_USAGE: "keyUsage",
+ OID_SUBJECT_ALTERNATIVE_NAME: "subjectAltName",
+ OID_ISSUER_ALTERNATIVE_NAME: "issuerAltName",
+ OID_BASIC_CONSTRAINTS: "basicConstraints",
+ OID_CRL_REASON: "cRLReason",
+ OID_INVALIDITY_DATE: "invalidityDate",
+ OID_CERTIFICATE_ISSUER: "certificateIssuer",
+ OID_NAME_CONSTRAINTS: "nameConstraints",
+ OID_CRL_DISTRIBUTION_POINTS: "cRLDistributionPoints",
+ OID_CERTIFICATE_POLICIES: "certificatePolicies",
+ OID_POLICY_MAPPINGS: "policyMappings",
+ OID_AUTHORITY_KEY_IDENTIFIER: "authorityKeyIdentifier",
+ OID_POLICY_CONSTRAINTS: "policyConstraints",
+ OID_EXTENDED_KEY_USAGE: "extendedKeyUsage",
+ OID_FRESHEST_CRL: "freshestCRL",
+ OID_INHIBIT_ANY_POLICY: "inhibitAnyPolicy",
+ OID_AUTHORITY_INFORMATION_ACCESS: "authorityInfoAccess",
+ OID_SUBJECT_INFORMATION_ACCESS: "subjectInfoAccess",
+ OID_OCSP_NO_CHECK: "OCSPNoCheck",
+ OID_OCSP: "OCSP",
+ OID_CA_ISSUERS: "caIssuers",
+ OID_CPS_QUALIFIER: "id-qt-cps",
+ OID_CPS_USER_NOTICE: "id-qt-unotice",
}