blob: ff43be01e8528de869057bae22e590be7dddfcbb [file] [log] [blame]
Paul Kehrer016e08a2014-11-26 09:41:18 -10001X.509
2=====
3
Paul Kehrera9d78c12014-11-26 10:59:03 -10004.. currentmodule:: cryptography.x509
Paul Kehrer016e08a2014-11-26 09:41:18 -10005
Paul Kehrerd26c4db2015-03-15 15:36:24 -05006.. testsetup::
7
8 pem_req_data = b"""
9 -----BEGIN CERTIFICATE REQUEST-----
10 MIIC0zCCAbsCAQAwWTELMAkGA1UEBhMCVVMxETAPBgNVBAgMCElsbGlub2lzMRAw
11 DgYDVQQHDAdDaGljYWdvMREwDwYDVQQKDAhyNTA5IExMQzESMBAGA1UEAwwJaGVs
12 bG8uY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqhZx+Mo9VRd9
13 vsnWWa6NBCws21rZ0+1B/JGgB4hDsZS7iDE4Bj5z4idheFRtl8bBbdjPknq7BfoF
14 8v15Zq/Zv7i2xMSDL+LUrTBZezRd4bRTGqCm6YJ5EYkhqdcqeZleHCFImguHoq1J
15 Fh0+kObQrTHXw3ZP57a3o1IvyIUA3nNoCBL0QQhwBXaDXOojMKNR+bqB5ve8GS1y
16 Elr0AM/+cJsfaIahNQUgFKx3Eu3GeEOMKYOAG1lycgdQdmTUybLrT3U7vkClTseM
17 xHg1r5En7ALjONIhqRuq3rddYahrP8HXozb3zUy3cJ7P6IeaosuvNzvMXOX9P6HD
18 Ha9urDAJ1wIDAQABoDUwMwYJKoZIhvcNAQkOMSYwJDAiBgNVHREEGzAZggl3b3Js
19 ZC5jb22CDHdoYXRldmVyLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAS4Ro6h+z52SK
20 YSLCYARpnEu/rmh4jdqndt8naqcNb6uLx9mlKZ2W9on9XDjnSdQD9q+ZP5aZfESw
21 R0+rJhW9ZrNa/g1pt6M24ihclHYDAxYMWxT1z/TXXGM3TmZZ6gfYlNE1kkBuODHa
22 UYsR/1Ht1E1EsmmUimt2n+zQR2K8T9Coa+boaUW/GsTEuz1aaJAkj5ZvTDiIhRG4
23 AOCqFZOLAQmCCNgJnnspD9hDz/Ons085LF5wnYjN4/Nsk5tS6AGs3xjZ3jPoOGGn
24 82WQ9m4dBGoVDZXsobVTaN592JEYwN5iu72zRn7Einb4V4H5y3yD2dD4yWPlt4pk
25 5wFkeYsZEA==
26 -----END CERTIFICATE REQUEST-----
27 """.strip()
28
Paul Kehrerd3dafbd2015-03-15 16:24:18 -050029 pem_data = b"""
30 -----BEGIN CERTIFICATE-----
31 MIIDfDCCAmSgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJVUzEf
32 MB0GA1UEChMWVGVzdCBDZXJ0aWZpY2F0ZXMgMjAxMTEVMBMGA1UEAxMMVHJ1c3Qg
33 QW5jaG9yMB4XDTEwMDEwMTA4MzAwMFoXDTMwMTIzMTA4MzAwMFowQDELMAkGA1UE
34 BhMCVVMxHzAdBgNVBAoTFlRlc3QgQ2VydGlmaWNhdGVzIDIwMTExEDAOBgNVBAMT
35 B0dvb2QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQWJpHYo37
36 Xfb7oJSPe+WvfTlzIG21WQ7MyMbGtK/m8mejCzR6c+f/pJhEH/OcDSMsXq8h5kXa
37 BGqWK+vSwD/Pzp5OYGptXmGPcthDtAwlrafkGOS4GqIJ8+k9XGKs+vQUXJKsOk47
38 RuzD6PZupq4s16xaLVqYbUC26UcY08GpnoLNHJZS/EmXw1ZZ3d4YZjNlpIpWFNHn
39 UGmdiGKXUPX/9H0fVjIAaQwjnGAbpgyCumWgzIwPpX+ElFOUr3z7BoVnFKhIXze+
40 VmQGSWxZxvWDUN90Ul0tLEpLgk3OVxUB4VUGuf15OJOpgo1xibINPmWt14Vda2N9
41 yrNKloJGZNqLAgMBAAGjfDB6MB8GA1UdIwQYMBaAFOR9X9FclYYILAWuvnW2ZafZ
42 XahmMB0GA1UdDgQWBBRYAYQkG7wrUpRKPaUQchRR9a86yTAOBgNVHQ8BAf8EBAMC
43 AQYwFwYDVR0gBBAwDjAMBgpghkgBZQMCATABMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
44 KoZIhvcNAQELBQADggEBADWHlxbmdTXNwBL/llwhQqwnazK7CC2WsXBBqgNPWj7m
45 tvQ+aLG8/50Qc2Sun7o2VnwF9D18UUe8Gj3uPUYH+oSI1vDdyKcjmMbKRU4rk0eo
46 3UHNDXwqIVc9CQS9smyV+x1HCwL4TTrq+LXLKx/qVij0Yqk+UJfAtrg2jnYKXsCu
47 FMBQQnWCGrwa1g1TphRp/RmYHnMynYFmZrXtzFz+U9XEA7C+gPq4kqDI/iVfIT1s
48 6lBtdB50lrDVwl2oYfAvW/6sC2se2QleZidUmrziVNP4oEeXINokU6T6p//HM1FG
49 QYw2jOvpKcKtWCSAnegEbgsGYzATKjmPJPJ0npHFqzM=
50 -----END CERTIFICATE-----
51 """.strip()
52
Paul Kehrer93ae8052015-05-02 23:18:09 -050053 cryptography_cert_pem = b"""
54 -----BEGIN CERTIFICATE-----
55 MIIFvTCCBKWgAwIBAgICPyAwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UEBhMCVVMx
56 FjAUBgNVBAoTDUdlb1RydXN0IEluYy4xIDAeBgNVBAMTF1JhcGlkU1NMIFNIQTI1
57 NiBDQSAtIEczMB4XDTE0MTAxNTEyMDkzMloXDTE4MTExNjAxMTUwM1owgZcxEzAR
58 BgNVBAsTCkdUNDg3NDI5NjUxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29t
59 L3Jlc291cmNlcy9jcHMgKGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZh
60 bGlkYXRlZCAtIFJhcGlkU1NMKFIpMRwwGgYDVQQDExN3d3cuY3J5cHRvZ3JhcGh5
61 LmlvMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAom/FebKJIot7Sp3s
62 itG1sicpe3thCssjI+g1JDAS7I3GLVNmbms1DOdIIqwf01gZkzzXBN2+9sOnyRaR
63 PPfCe1jTr3dk2y6rPE559vPa1nZQkhlzlhMhlPyjaT+S7g4Tio4qV2sCBZU01DZJ
64 CaksfohN+5BNVWoJzTbOcrHOEJ+M8B484KlBCiSxqf9cyNQKru4W3bHaCVNVJ8eu
65 6i6KyhzLa0L7yK3LXwwXVs583C0/vwFhccGWsFODqD/9xHUzsBIshE8HKjdjDi7Y
66 3BFQzVUQFjBB50NSZfAA/jcdt1blxJouc7z9T8Oklh+V5DDBowgAsrT4b6Z2Fq6/
67 r7D1GqivLK/ypUQmxq2WXWAUBb/Q6xHgxASxI4Br+CByIUQJsm8L2jzc7k+mF4hW
68 ltAIUkbo8fGiVnat0505YJgxWEDKOLc4Gda6d/7GVd5AvKrz242bUqeaWo6e4MTx
69 diku2Ma3rhdcr044Qvfh9hGyjqNjvhWY/I+VRWgihU7JrYvgwFdJqsQ5eiKT4OHi
70 gsejvWwkZzDtiQ+aQTrzM1FsY2swJBJsLSX4ofohlVRlIJCn/ME+XErj553431Lu
71 YQ5SzMd3nXzN78Vj6qzTfMUUY72UoT1/AcFiUMobgIqrrmwuNxfrkbVE2b6Bga74
72 FsJX63prvrJ41kuHK/16RQBM7fcCAwEAAaOCAWAwggFcMB8GA1UdIwQYMBaAFMOc
73 8/zTRgg0u85Gf6B8W/PiCMtZMFcGCCsGAQUFBwEBBEswSTAfBggrBgEFBQcwAYYT
74 aHR0cDovL2d2LnN5bWNkLmNvbTAmBggrBgEFBQcwAoYaaHR0cDovL2d2LnN5bWNi
75 LmNvbS9ndi5jcnQwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB
76 BggrBgEFBQcDAjAvBgNVHREEKDAmghN3d3cuY3J5cHRvZ3JhcGh5Lmlvgg9jcnlw
77 dG9ncmFwaHkuaW8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL2d2LnN5bWNiLmNv
78 bS9ndi5jcmwwDAYDVR0TAQH/BAIwADBFBgNVHSAEPjA8MDoGCmCGSAGG+EUBBzYw
79 LDAqBggrBgEFBQcCARYeaHR0cHM6Ly93d3cucmFwaWRzc2wuY29tL2xlZ2FsMA0G
80 CSqGSIb3DQEBCwUAA4IBAQAzIYO2jx7h17FBT74tJ2zbV9OKqGb7QF8y3wUtP4xc
81 dH80vprI/Cfji8s86kr77aAvAqjDjaVjHn7UzebhSUivvRPmfzRgyWBacomnXTSt
82 Xlt2dp2nDQuwGyK2vB7dMfKnQAkxwq1sYUXznB8i0IhhCAoXp01QGPKq51YoIlnF
83 7DRMk6iEaL1SJbkIrLsCQyZFDf0xtfW9DqXugMMLoxeCsBhZJQzNyS2ryirrv9LH
84 aK3+6IZjrcyy9bkpz/gzJucyhU+75c4My/mnRCrtItRbCQuiI5pd5poDowm+HH9i
85 GVI9+0lAFwxOUnOnwsoI40iOoxjLMGB+CgFLKCGUcWxP
86 -----END CERTIFICATE-----
87 """.strip()
88
Paul Kehrerd3dafbd2015-03-15 16:24:18 -050089X.509 is an ITU-T standard for a `public key infrastructure`_. X.509v3 is
90defined in :rfc:`5280` (which obsoletes :rfc:`2459` and :rfc:`3280`). X.509
91certificates are commonly used in protocols like `TLS`_.
Paul Kehrerb2de9482014-12-11 14:54:48 -060092
93Loading Certificates
94~~~~~~~~~~~~~~~~~~~~
Paul Kehrer016e08a2014-11-26 09:41:18 -100095
96.. function:: load_pem_x509_certificate(data, backend)
97
98 .. versionadded:: 0.7
99
Paul Kehrere76cd272014-12-14 19:00:51 -0600100 Deserialize a certificate from PEM encoded data. PEM certificates are
101 base64 decoded and have delimiters that look like
102 ``-----BEGIN CERTIFICATE-----``.
Paul Kehrer016e08a2014-11-26 09:41:18 -1000103
104 :param bytes data: The PEM encoded certificate data.
105
106 :param backend: A backend supporting the
107 :class:`~cryptography.hazmat.backends.interfaces.X509Backend`
108 interface.
109
Paul Kehrere76cd272014-12-14 19:00:51 -0600110 :returns: An instance of :class:`~cryptography.x509.Certificate`.
Paul Kehrer016e08a2014-11-26 09:41:18 -1000111
112.. function:: load_der_x509_certificate(data, backend)
113
114 .. versionadded:: 0.7
115
Paul Kehrere76cd272014-12-14 19:00:51 -0600116 Deserialize a certificate from DER encoded data. DER is a binary format
Paul Kehrer92aac382014-12-15 16:25:28 -0600117 and is commonly found in files with the ``.cer`` extension (although file
118 extensions are not a guarantee of encoding type).
Paul Kehrer016e08a2014-11-26 09:41:18 -1000119
120 :param bytes data: The DER encoded certificate data.
121
122 :param backend: A backend supporting the
123 :class:`~cryptography.hazmat.backends.interfaces.X509Backend`
124 interface.
125
Paul Kehrere76cd272014-12-14 19:00:51 -0600126 :returns: An instance of :class:`~cryptography.x509.Certificate`.
Paul Kehrer016e08a2014-11-26 09:41:18 -1000127
Paul Kehrer016e08a2014-11-26 09:41:18 -1000128.. doctest::
129
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600130 >>> from cryptography import x509
Paul Kehrer016e08a2014-11-26 09:41:18 -1000131 >>> from cryptography.hazmat.backends import default_backend
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600132 >>> cert = x509.load_pem_x509_certificate(pem_data, default_backend())
Paul Kehrer016e08a2014-11-26 09:41:18 -1000133 >>> cert.serial
134 2
135
Paul Kehrera1a1f232015-03-15 15:34:35 -0500136Loading Certificate Signing Requests
137~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600138
Paul Kehrer31e39882015-03-11 11:37:04 -0500139.. function:: load_pem_x509_csr(data, backend)
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600140
141 .. versionadded:: 0.9
142
Paul Kehrera1a1f232015-03-15 15:34:35 -0500143 Deserialize a certificate signing request (CSR) from PEM encoded data. PEM
Paul Kehrer5aadb9c2015-03-11 20:48:42 -0500144 requests are base64 decoded and have delimiters that look like
Paul Kehrerd3dafbd2015-03-15 16:24:18 -0500145 ``-----BEGIN CERTIFICATE REQUEST-----``. This format is also known as
146 PKCS#10.
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600147
148 :param bytes data: The PEM encoded request data.
149
150 :param backend: A backend supporting the
151 :class:`~cryptography.hazmat.backends.interfaces.X509Backend`
152 interface.
153
Paul Kehrera1a1f232015-03-15 15:34:35 -0500154 :returns: An instance of
155 :class:`~cryptography.x509.CertificateSigningRequest`.
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600156
Paul Kehrer1effb6e2015-03-30 15:05:59 -0500157.. function:: load_der_x509_csr(data, backend)
158
159 .. versionadded:: 0.9
160
161 Deserialize a certificate signing request (CSR) from DER encoded data. DER
162 is a binary format and is not commonly used with CSRs.
163
164 :param bytes data: The DER encoded request data.
165
166 :param backend: A backend supporting the
167 :class:`~cryptography.hazmat.backends.interfaces.X509Backend`
168 interface.
169
170 :returns: An instance of
171 :class:`~cryptography.x509.CertificateSigningRequest`.
172
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600173.. doctest::
174
175 >>> from cryptography import x509
176 >>> from cryptography.hazmat.backends import default_backend
177 >>> from cryptography.hazmat.primitives import hashes
Paul Kehrera1a1f232015-03-15 15:34:35 -0500178 >>> csr = x509.load_pem_x509_csr(pem_req_data, default_backend())
179 >>> isinstance(csr.signature_hash_algorithm, hashes.SHA1)
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600180 True
181
Paul Kehrere76cd272014-12-14 19:00:51 -0600182X.509 Certificate Object
183~~~~~~~~~~~~~~~~~~~~~~~~
Paul Kehrerb2de9482014-12-11 14:54:48 -0600184
Paul Kehrere76cd272014-12-14 19:00:51 -0600185.. class:: Certificate
Paul Kehrerb2de9482014-12-11 14:54:48 -0600186
187 .. versionadded:: 0.7
188
189 .. attribute:: version
190
Paul Kehrere76cd272014-12-14 19:00:51 -0600191 :type: :class:`~cryptography.x509.Version`
Paul Kehrerb2de9482014-12-11 14:54:48 -0600192
Paul Kehrere76cd272014-12-14 19:00:51 -0600193 The certificate version as an enumeration. Version 3 certificates are
194 the latest version and also the only type you should see in practice.
Paul Kehrerb2de9482014-12-11 14:54:48 -0600195
Alex Gaynor89c4dc82014-12-16 16:49:33 -0800196 :raises cryptography.x509.InvalidVersion: If the version in the
Alex Gaynor6d7ab4c2014-12-16 16:50:33 -0800197 certificate is not a known
198 :class:`X.509 version <cryptography.x509.Version>`.
Paul Kehrer92aac382014-12-15 16:25:28 -0600199
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600200 .. doctest::
201
202 >>> cert.version
203 <Version.v3: 2>
204
Paul Kehrerb2de9482014-12-11 14:54:48 -0600205 .. method:: fingerprint(algorithm)
206
207 :param algorithm: The
Paul Kehrer601278a2015-02-12 12:51:00 -0600208 :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
Paul Kehrerb2de9482014-12-11 14:54:48 -0600209 that will be used to generate the fingerprint.
210
211 :return bytes: The fingerprint using the supplied hash algorithm as
212 bytes.
213
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600214 .. doctest::
215
216 >>> from cryptography.hazmat.primitives import hashes
217 >>> cert.fingerprint(hashes.SHA256())
Paul Kehrer78a81502014-12-16 14:47:52 -0600218 '\x86\xd2\x187Gc\xfc\xe7}[+E9\x8d\xb4\x8f\x10\xe5S\xda\x18u\xbe}a\x03\x08[\xac\xa04?'
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600219
Paul Kehrerb2de9482014-12-11 14:54:48 -0600220 .. attribute:: serial
221
222 :type: int
223
224 The serial as a Python integer.
225
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600226 .. doctest::
227
228 >>> cert.serial
229 2
230
Paul Kehrerb2de9482014-12-11 14:54:48 -0600231 .. method:: public_key()
232
233 :type:
Alex Stapletonf79c2312014-12-30 12:50:14 +0000234 :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey` or
Paul Kehrer45efdbc2015-02-12 10:58:22 -0600235 :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` or
236 :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey`
Paul Kehrerb2de9482014-12-11 14:54:48 -0600237
238 The public key associated with the certificate.
239
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600240 .. doctest::
241
Alex Stapletonf79c2312014-12-30 12:50:14 +0000242 >>> from cryptography.hazmat.primitives.asymmetric import rsa
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600243 >>> public_key = cert.public_key()
Alex Stapletonf79c2312014-12-30 12:50:14 +0000244 >>> isinstance(public_key, rsa.RSAPublicKey)
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600245 True
246
Paul Kehrerb2de9482014-12-11 14:54:48 -0600247 .. attribute:: not_valid_before
248
249 :type: :class:`datetime.datetime`
250
Paul Kehrer78a81502014-12-16 14:47:52 -0600251 A naïve datetime representing the beginning of the validity period for
252 the certificate in UTC. This value is inclusive.
Paul Kehrerb2de9482014-12-11 14:54:48 -0600253
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600254 .. doctest::
255
256 >>> cert.not_valid_before
257 datetime.datetime(2010, 1, 1, 8, 30)
258
Paul Kehrerb2de9482014-12-11 14:54:48 -0600259 .. attribute:: not_valid_after
260
261 :type: :class:`datetime.datetime`
262
Paul Kehrer78a81502014-12-16 14:47:52 -0600263 A naïve datetime representing the end of the validity period for the
264 certificate in UTC. This value is inclusive.
Paul Kehrerb2de9482014-12-11 14:54:48 -0600265
Paul Kehrercc8a26e2014-12-16 12:40:16 -0600266 .. doctest::
267
268 >>> cert.not_valid_after
269 datetime.datetime(2030, 12, 31, 8, 30)
270
Paul Kehrer719d5362015-01-01 20:03:52 -0600271 .. attribute:: issuer
272
273 .. versionadded:: 0.8
274
275 :type: :class:`Name`
276
277 The :class:`Name` of the issuer.
278
279 .. attribute:: subject
280
281 .. versionadded:: 0.8
282
283 :type: :class:`Name`
284
285 The :class:`Name` of the subject.
286
Paul Kehrer8802a5b2015-02-13 12:06:57 -0600287 .. attribute:: signature_hash_algorithm
Paul Kehrer56da2a52015-02-11 23:35:07 -0600288
Paul Kehrer8802a5b2015-02-13 12:06:57 -0600289 :type: :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
Paul Kehrer56da2a52015-02-11 23:35:07 -0600290
Paul Kehrere612ec72015-02-16 14:33:35 -0600291 Returns the
Paul Kehrer71d40c62015-02-19 08:21:04 -0600292 :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` which
Paul Kehrer1a7ba872015-02-19 18:09:05 -0600293 was used in signing this certificate.
Paul Kehrer56da2a52015-02-11 23:35:07 -0600294
295 .. doctest::
296
Paul Kehrer8802a5b2015-02-13 12:06:57 -0600297 >>> from cryptography.hazmat.primitives import hashes
298 >>> isinstance(cert.signature_hash_algorithm, hashes.SHA256)
299 True
Paul Kehrer719d5362015-01-01 20:03:52 -0600300
Paul Kehrerfbb7ac82015-03-16 19:26:29 -0500301 .. attribute:: extensions
302
303 :type: :class:`Extensions`
304
305 The extensions encoded in the certificate.
306
307 :raises cryptography.x509.DuplicateExtension: If more than one
308 extension of the same type is found within the certificate.
309
Paul Kehrerd8fc0be2015-04-21 08:31:10 -0500310 :raises cryptography.x509.UnsupportedExtension: If the certificate
311 contains an extension that is not supported.
312
Paul Kehrerbed07352015-04-21 08:31:10 -0500313 :raises cryptography.x509.UnsupportedGeneralNameType: If an extension
314 contains a general name that is not supported.
315
Paul Kehrerfa56a232015-03-17 13:14:03 -0500316 .. doctest::
317
318 >>> for ext in cert.extensions:
319 ... print(ext)
Paul Kehrerd774de92015-05-03 10:52:25 -0500320 <Extension(oid=<ObjectIdentifier(oid=2.5.29.35, name=authorityKeyIdentifier)>, critical=False, value=<AuthorityKeyIdentifier(key_identifier='\xe4}_\xd1\\\x95\x86\x08,\x05\xae\xbeu\xb6e\xa7\xd9]\xa8f', authority_cert_issuer=None, authority_cert_serial_number=None)>)>
Paul Kehrercbfb1012015-04-10 20:57:20 -0400321 <Extension(oid=<ObjectIdentifier(oid=2.5.29.14, name=subjectKeyIdentifier)>, critical=False, value=<SubjectKeyIdentifier(digest='X\x01\x84$\x1b\xbc+R\x94J=\xa5\x10r\x14Q\xf5\xaf:\xc9')>)>
Paul Kehrerb511ba82015-04-15 11:22:48 -0400322 <Extension(oid=<ObjectIdentifier(oid=2.5.29.15, name=keyUsage)>, critical=True, value=<KeyUsage(digital_signature=False, content_commitment=False, key_encipherment=False, data_encipherment=False, key_agreement=False, key_cert_sign=True, crl_sign=True, encipher_only=None, decipher_only=None)>)>
Paul Kehrer2008d9c2015-05-12 22:19:56 -0500323 <Extension(oid=<ObjectIdentifier(oid=2.5.29.32, name=certificatePolicies)>, critical=False, value=<CertificatePolicies([<PolicyInformation(policy_identifier=<ObjectIdentifier(oid=2.16.840.1.101.3.2.1.48.1, name=Unknown OID)>, policy_qualifiers=None)>])>)>
Paul Kehrerfa56a232015-03-17 13:14:03 -0500324 <Extension(oid=<ObjectIdentifier(oid=2.5.29.19, name=basicConstraints)>, critical=True, value=<BasicConstraints(ca=True, path_length=None)>)>
325
Paul Kehrer5aadb9c2015-03-11 20:48:42 -0500326X.509 CSR (Certificate Signing Request) Object
327~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600328
Paul Kehrera1a1f232015-03-15 15:34:35 -0500329.. class:: CertificateSigningRequest
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600330
331 .. versionadded:: 0.9
332
333 .. method:: public_key()
334
335 :type:
336 :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey` or
337 :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` or
338 :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey`
339
340 The public key associated with the request.
341
342 .. doctest::
343
344 >>> from cryptography.hazmat.primitives.asymmetric import rsa
Paul Kehrera1a1f232015-03-15 15:34:35 -0500345 >>> public_key = csr.public_key()
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600346 >>> isinstance(public_key, rsa.RSAPublicKey)
347 True
348
349 .. attribute:: subject
350
351 :type: :class:`Name`
352
353 The :class:`Name` of the subject.
354
355 .. attribute:: signature_hash_algorithm
356
357 :type: :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
358
359 Returns the
360 :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` which
361 was used in signing this request.
362
363 .. doctest::
364
365 >>> from cryptography.hazmat.primitives import hashes
Paul Kehrera1a1f232015-03-15 15:34:35 -0500366 >>> isinstance(csr.signature_hash_algorithm, hashes.SHA1)
Paul Kehrerdc480ad2015-02-23 12:14:54 -0600367 True
368
Paul Kehrer719d5362015-01-01 20:03:52 -0600369.. class:: Name
370
371 .. versionadded:: 0.8
372
Paul Kehrer53d8d492015-02-13 18:47:30 -0600373 An X509 Name is an ordered list of attributes. The object is iterable to
Paul Kehrerd21596e2015-02-14 09:17:26 -0600374 get every attribute or you can use :meth:`Name.get_attributes_for_oid` to
Paul Kehrer719d5362015-01-01 20:03:52 -0600375 obtain the specific type you want. Names are sometimes represented as a
Paul Kehrer53d8d492015-02-13 18:47:30 -0600376 slash or comma delimited string (e.g. ``/CN=mydomain.com/O=My Org/C=US`` or
377 ``CN=mydomain.com, O=My Org, C=US``).
Paul Kehrer719d5362015-01-01 20:03:52 -0600378
Paul Kehrer53d8d492015-02-13 18:47:30 -0600379 .. doctest::
Paul Kehrer719d5362015-01-01 20:03:52 -0600380
Paul Kehrer8b21a4a2015-02-14 07:56:36 -0600381 >>> len(cert.subject)
Paul Kehrer53d8d492015-02-13 18:47:30 -0600382 3
Paul Kehrer8b21a4a2015-02-14 07:56:36 -0600383 >>> for attribute in cert.subject:
384 ... print(attribute)
385 <NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.6, name=countryName)>, value=u'US')>
386 <NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.10, name=organizationName)>, value=u'Test Certificates 2011')>
387 <NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonName)>, value=u'Good CA')>
Paul Kehrer719d5362015-01-01 20:03:52 -0600388
Paul Kehrere901d642015-02-11 18:50:58 -0600389 .. method:: get_attributes_for_oid(oid)
Paul Kehrer719d5362015-01-01 20:03:52 -0600390
Paul Kehrere901d642015-02-11 18:50:58 -0600391 :param oid: An :class:`ObjectIdentifier` instance.
Paul Kehrer719d5362015-01-01 20:03:52 -0600392
Paul Kehrere901d642015-02-11 18:50:58 -0600393 :returns: A list of :class:`NameAttribute` instances that match the
394 OID provided. If nothing matches an empty list will be returned.
Paul Kehrer719d5362015-01-01 20:03:52 -0600395
396 .. doctest::
397
Paul Kehrere901d642015-02-11 18:50:58 -0600398 >>> cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)
399 [<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonName)>, value=u'Good CA')>]
Paul Kehrerb2de9482014-12-11 14:54:48 -0600400
Paul Kehrere76cd272014-12-14 19:00:51 -0600401.. class:: Version
Paul Kehrer016e08a2014-11-26 09:41:18 -1000402
403 .. versionadded:: 0.7
404
405 An enumeration for X.509 versions.
406
407 .. attribute:: v1
408
409 For version 1 X.509 certificates.
410
411 .. attribute:: v3
412
413 For version 3 X.509 certificates.
414
Paul Kehrer806bfb22015-02-02 17:05:24 -0600415.. class:: NameAttribute
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600416
417 .. versionadded:: 0.8
418
Paul Kehrer834d22f2015-02-06 11:01:07 -0600419 An X.509 name consists of a list of NameAttribute instances.
Paul Kehrer5b0a8d62015-01-30 20:05:55 -0600420
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600421 .. attribute:: oid
422
423 :type: :class:`ObjectIdentifier`
424
425 The attribute OID.
426
427 .. attribute:: value
428
Paul Kehrerd5852cb2015-01-30 08:25:23 -0600429 :type: :term:`text`
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600430
431 The value of the attribute.
432
433.. class:: ObjectIdentifier
434
435 .. versionadded:: 0.8
436
Paul Kehrer5b0a8d62015-01-30 20:05:55 -0600437 Object identifiers (frequently seen abbreviated as OID) identify the type
Paul Kehrer806bfb22015-02-02 17:05:24 -0600438 of a value (see: :class:`NameAttribute`).
Paul Kehrer5b0a8d62015-01-30 20:05:55 -0600439
Paul Kehrerd44f9a62015-02-04 14:47:34 -0600440 .. attribute:: dotted_string
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600441
442 :type: :class:`str`
443
Paul Kehrerfedf4f42015-02-06 11:22:07 -0600444 The dotted string value of the OID (e.g. ``"2.5.4.3"``)
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600445
Paul Kehrer31bdf792015-03-25 14:11:00 -0500446.. _general_name_classes:
447
448General Name Classes
449~~~~~~~~~~~~~~~~~~~~
450
451.. class:: GeneralName
452
453 .. versionadded:: 0.9
454
455 This is the generic interface that all the following classes are registered
456 against.
457
458.. class:: RFC822Name
459
460 .. versionadded:: 0.9
461
462 This corresponds to an email address. For example, ``user@example.com``.
463
464 .. attribute:: value
465
466 :type: :term:`text`
467
468.. class:: DNSName
469
470 .. versionadded:: 0.9
471
472 This corresponds to a domain name. For example, ``cryptography.io``.
473
474 .. attribute:: value
475
476 :type: :term:`text`
477
478.. class:: DirectoryName
479
480 .. versionadded:: 0.9
481
482 This corresponds to a directory name.
483
484 .. attribute:: value
485
486 :type: :class:`Name`
487
488.. class:: UniformResourceIdentifier
489
490 .. versionadded:: 0.9
491
492 This corresponds to a uniform resource identifier. For example,
Paul Kehrerb8ef82e2015-04-22 16:04:24 -0500493 ``https://cryptography.io``. The URI is parsed and IDNA decoded (see
494 :rfc:`5895`).
495
496 .. note::
497
498 URIs that do not contain ``://`` in them will not be decoded.
Paul Kehrer31bdf792015-03-25 14:11:00 -0500499
500 .. attribute:: value
501
502 :type: :term:`text`
503
504.. class:: IPAddress
505
506 .. versionadded:: 0.9
507
508 This corresponds to an IP address.
509
510 .. attribute:: value
511
512 :type: :class:`~ipaddress.IPv4Address` or
513 :class:`~ipaddress.IPv6Address`.
514
515.. class:: RegisteredID
516
517 .. versionadded:: 0.9
518
519 This corresponds to a registered ID.
520
521 .. attribute:: value
522
523 :type: :class:`ObjectIdentifier`
524
Paul Kehrer8cf26422015-03-21 09:50:24 -0500525X.509 Extensions
526~~~~~~~~~~~~~~~~
527
Paul Kehrerfbb7ac82015-03-16 19:26:29 -0500528.. class:: Extensions
529
530 .. versionadded:: 0.9
531
532 An X.509 Extensions instance is an ordered list of extensions. The object
533 is iterable to get every extension.
534
Paul Kehrerfa56a232015-03-17 13:14:03 -0500535 .. method:: get_extension_for_oid(oid)
536
537 :param oid: An :class:`ObjectIdentifier` instance.
538
539 :returns: An instance of the extension class.
540
541 :raises cryptography.x509.ExtensionNotFound: If the certificate does
542 not have the extension requested.
543
Paul Kehrerfa56a232015-03-17 13:14:03 -0500544 .. doctest::
545
546 >>> cert.extensions.get_extension_for_oid(x509.OID_BASIC_CONSTRAINTS)
547 <Extension(oid=<ObjectIdentifier(oid=2.5.29.19, name=basicConstraints)>, critical=True, value=<BasicConstraints(ca=True, path_length=None)>)>
548
Paul Kehrer8cf26422015-03-21 09:50:24 -0500549.. class:: Extension
550
551 .. versionadded:: 0.9
552
Paul Kehrer85894662015-03-22 13:19:31 -0500553 .. attribute:: oid
554
555 :type: :class:`ObjectIdentifier`
556
Paul Kehrer5553d572015-03-23 21:08:01 -0500557 The :ref:`extension OID <extension_oids>`.
Paul Kehrer8cf26422015-03-21 09:50:24 -0500558
559 .. attribute:: critical
560
561 :type: bool
562
Paul Kehrer58b75692015-03-22 23:24:58 -0500563 Determines whether a given extension is critical or not. :rfc:`5280`
564 requires that "A certificate-using system MUST reject the certificate
565 if it encounters a critical extension it does not recognize or a
566 critical extension that contains information that it cannot process".
Paul Kehrer8cf26422015-03-21 09:50:24 -0500567
Paul Kehrer85894662015-03-22 13:19:31 -0500568 .. attribute:: value
569
570 Returns an instance of the extension type corresponding to the OID.
571
Paul Kehrercecbbba2015-03-30 14:58:38 -0500572.. class:: KeyUsage
573
574 .. versionadded:: 0.9
575
576 The key usage extension defines the purpose of the key contained in the
577 certificate. The usage restriction might be employed when a key that could
578 be used for more than one operation is to be restricted. It corresponds to
579 :data:`OID_KEY_USAGE`.
580
581 .. attribute:: digital_signature
582
583 :type: bool
584
Paul Kehrer738407b2015-04-01 22:39:02 -0500585 This purpose is set to true when the subject public key is used for verifying
Paul Kehrercecbbba2015-03-30 14:58:38 -0500586 digital signatures, other than signatures on certificates
587 (``key_cert_sign``) and CRLs (``crl_sign``).
588
589 .. attribute:: content_commitment
590
591 :type: bool
592
Paul Kehrer738407b2015-04-01 22:39:02 -0500593 This purpose is set to true when the subject public key is used for verifying
Paul Kehrercecbbba2015-03-30 14:58:38 -0500594 digital signatures, other than signatures on certificates
595 (``key_cert_sign``) and CRLs (``crl_sign``). It is used to provide a
596 non-repudiation service that protects against the signing entity
597 falsely denying some action. In the case of later conflict, a
598 reliable third party may determine the authenticity of the signed
599 data. This was called ``non_repudiation`` in older revisions of the
600 X.509 specification.
601
602 .. attribute:: key_encipherment
603
604 :type: bool
605
Paul Kehrer738407b2015-04-01 22:39:02 -0500606 This purpose is set to true when the subject public key is used for
607 enciphering private or secret keys.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500608
609 .. attribute:: data_encipherment
610
611 :type: bool
612
Paul Kehrer738407b2015-04-01 22:39:02 -0500613 This purpose is set to true when the subject public key is used for
614 directly enciphering raw user data without the use of an intermediate
615 symmetric cipher.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500616
617 .. attribute:: key_agreement
618
619 :type: bool
620
Paul Kehrer738407b2015-04-01 22:39:02 -0500621 This purpose is set to true when the subject public key is used for key
622 agreement. For example, when a Diffie-Hellman key is to be used for
623 key management, then this purpose is set to true.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500624
625 .. attribute:: key_cert_sign
626
627 :type: bool
628
Paul Kehrer738407b2015-04-01 22:39:02 -0500629 This purpose is set to true when the subject public key is used for
630 verifying signatures on public key certificates. If this purpose is set
631 to true then ``ca`` must be true in the :class:`BasicConstraints`
632 extension.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500633
634 .. attribute:: crl_sign
635
636 :type: bool
637
Paul Kehrer738407b2015-04-01 22:39:02 -0500638 This purpose is set to true when the subject public key is used for
639 verifying signatures on certificate revocation lists.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500640
641 .. attribute:: encipher_only
642
643 :type: bool
644
Paul Kehrer738407b2015-04-01 22:39:02 -0500645 When this purposes is set to true and the ``key_agreement`` purpose is
646 also set, the subject public key may be used only for enciphering data
647 while performing key agreement.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500648
649 :raises ValueError: This is raised if accessed when ``key_agreement``
650 is false.
651
652 .. attribute:: decipher_only
653
654 :type: bool
655
Paul Kehrer738407b2015-04-01 22:39:02 -0500656 When this purposes is set to true and the ``key_agreement`` purpose is
657 also set, the subject public key may be used only for deciphering data
658 while performing key agreement.
Paul Kehrercecbbba2015-03-30 14:58:38 -0500659
660 :raises ValueError: This is raised if accessed when ``key_agreement``
661 is false.
662
663
Paul Kehrer8cf26422015-03-21 09:50:24 -0500664.. class:: BasicConstraints
665
666 .. versionadded:: 0.9
667
Paul Kehrer85894662015-03-22 13:19:31 -0500668 Basic constraints is an X.509 extension type that defines whether a given
Paul Kehrer8cf26422015-03-21 09:50:24 -0500669 certificate is allowed to sign additional certificates and what path
Paul Kehrer85894662015-03-22 13:19:31 -0500670 length restrictions may exist. It corresponds to
671 :data:`OID_BASIC_CONSTRAINTS`.
Paul Kehrer8cf26422015-03-21 09:50:24 -0500672
673 .. attribute:: ca
674
675 :type: bool
676
677 Whether the certificate can sign certificates.
678
679 .. attribute:: path_length
680
Paul Kehrerfd1444c2015-03-21 19:47:05 -0500681 :type: int or None
Paul Kehrer8cf26422015-03-21 09:50:24 -0500682
683 The maximum path length for certificates subordinate to this
684 certificate. This attribute only has meaning if ``ca`` is true.
685 If ``ca`` is true then a path length of None means there's no
686 restriction on the number of subordinate CAs in the certificate chain.
Alex Gaynor99c5f152015-05-03 10:01:04 -0400687 If it is zero or greater then it defines the maximum length for a
688 subordinate CA's certificate chain. For example, a ``path_length`` of 1
689 means the certificate can sign a subordinate CA, but the subordinate CA
690 is not allowed to create subordinates with ``ca`` set to true.
Paul Kehrer8cf26422015-03-21 09:50:24 -0500691
Paul Kehrerffa2a152015-03-31 08:18:25 -0500692.. class:: ExtendedKeyUsage
693
694 .. versionadded:: 0.9
695
696 This extension indicates one or more purposes for which the certified
697 public key may be used, in addition to or in place of the basic
698 purposes indicated in the key usage extension. The object is
699 iterable to obtain the list of :ref:`extended key usage OIDs <eku_oids>`.
700
Paul Kehrer2eb4ed92015-04-11 15:33:45 -0400701.. class:: AuthorityKeyIdentifier
702
703 .. versionadded:: 0.9
704
705 The authority key identifier extension provides a means of identifying the
706 public key corresponding to the private key used to sign a certificate.
Paul Kehrer8c8cd722015-04-19 09:15:04 -0500707 This extension is typically used to assist in determining the appropriate
708 certificate chain. For more information about generation and use of this
709 extension see `RFC 5280 section 4.2.1.1`_.
Paul Kehrer2eb4ed92015-04-11 15:33:45 -0400710
711 .. attribute:: key_identifier
712
713 :type: bytes
714
Paul Kehrer9104b1d2015-04-18 09:23:44 -0500715 A value derived from the public key used to verify the certificate's
Paul Kehrer8c8cd722015-04-19 09:15:04 -0500716 signature.
Paul Kehrer9104b1d2015-04-18 09:23:44 -0500717
Paul Kehrer2eb4ed92015-04-11 15:33:45 -0400718 .. attribute:: authority_cert_issuer
719
720 :type: :class:`Name` or None
721
Paul Kehrer9104b1d2015-04-18 09:23:44 -0500722 The :class:`Name` of the issuer's issuer.
723
Paul Kehrer2eb4ed92015-04-11 15:33:45 -0400724 .. attribute:: authority_cert_serial_number
725
726 :type: int or None
727
Paul Kehrer9104b1d2015-04-18 09:23:44 -0500728 The serial number of the issuer's issuer.
729
Paul Kehrer1eb82a62015-03-31 20:00:33 -0500730.. class:: SubjectKeyIdentifier
731
732 .. versionadded:: 0.9
733
734 The subject key identifier extension provides a means of identifying
735 certificates that contain a particular public key.
736
737 .. attribute:: digest
738
739 :type: bytes
740
741 The binary value of the identifier.
742
Paul Kehrer31bdf792015-03-25 14:11:00 -0500743.. class:: SubjectAlternativeName
744
745 .. versionadded:: 0.9
746
747 Subject alternative name is an X.509 extension that provides a list of
748 :ref:`general name <general_name_classes>` instances that provide a set
749 of identities for which the certificate is valid. The object is iterable to
750 get every element.
751
752 .. method:: get_values_for_type(type)
753
754 :param type: A :class:`GeneralName` provider. This is one of the
755 :ref:`general name classes <general_name_classes>`.
756
757 :returns: A list of values extracted from the matched general names.
758
Paul Kehrer93ae8052015-05-02 23:18:09 -0500759 .. doctest::
760
761 >>> from cryptography import x509
762 >>> from cryptography.hazmat.backends import default_backend
763 >>> from cryptography.hazmat.primitives import hashes
764 >>> cert = x509.load_pem_x509_certificate(cryptography_cert_pem, default_backend())
Paul Kehrerd0cd5072015-05-02 23:27:00 -0500765 >>> # Get the subjectAltName extension from the certificate
Paul Kehrer93ae8052015-05-02 23:18:09 -0500766 >>> ext = cert.extensions.get_extension_for_oid(x509.OID_SUBJECT_ALTERNATIVE_NAME)
Paul Kehrerd0cd5072015-05-02 23:27:00 -0500767 >>> # Get the dNSName entries from the SAN extension
768 >>> ext.value.get_values_for_type(x509.DNSName)
Paul Kehrer93ae8052015-05-02 23:18:09 -0500769 [u'www.cryptography.io', u'cryptography.io']
770
Paul Kehrer8cf26422015-03-21 09:50:24 -0500771
Paul Kehrer3e6d5582015-05-02 21:57:56 -0500772.. class:: AuthorityInformationAccess
773
774 .. versionadded:: 0.9
775
776 The authority information access extension indicates how to access
777 information and services for the issuer of the certificate in which
778 the extension appears. Information and services may include online
779 validation services (such as OCSP) and issuer data. It is an iterable,
780 containing one or more :class:`AccessDescription` instances.
781
782
783.. class:: AccessDescription
784
Paul Kehrer5a485522015-05-06 00:29:12 -0500785 .. versionadded:: 0.9
786
Paul Kehrer3e6d5582015-05-02 21:57:56 -0500787 .. attribute:: access_method
788
789 :type: :class:`ObjectIdentifier`
790
Paul Kehrerf506bca2015-05-02 22:31:47 -0500791 The access method defines what the ``access_location`` means. It must
792 be either :data:`OID_OCSP` or :data:`OID_CA_ISSUERS`. If it is
793 :data:`OID_OCSP` the access location will be where to obtain OCSP
794 information for the certificate. If it is :data:`OID_CA_ISSUERS` the
795 access location will provide additional information about the issuing
796 certificate.
Paul Kehrer3e6d5582015-05-02 21:57:56 -0500797
798 .. attribute:: access_location
799
800 :type: :class:`GeneralName`
801
Paul Kehrerf506bca2015-05-02 22:31:47 -0500802 Where to access the information defined by the access method.
803
Paul Kehrer5a485522015-05-06 00:29:12 -0500804.. class:: CRLDistributionPoints
805
806 .. versionadded:: 0.9
807
808 The CRL distribution points extension identifies how CRL information is
809 obtained. It is an iterable, containing one or more
810 :class:`DistributionPoint` instances.
811
812.. class:: DistributionPoint
813
814 .. versionadded:: 0.9
815
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500816 .. attribute:: full_name
Paul Kehrer5a485522015-05-06 00:29:12 -0500817
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500818 :type: list of :class:`GeneralName` instances or None
Paul Kehrer5a485522015-05-06 00:29:12 -0500819
Paul Kehrerf2c072b2015-05-09 17:04:28 -0500820 This field describes methods to retrieve the CRL. At most one of
821 ``full_name`` or ``relative_name`` will be non-None.
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500822
823 .. attribute:: relative_name
824
825 :type: :class:`Name` or None
826
827 This field describes methods to retrieve the CRL relative to the CRL
Paul Kehrerf2c072b2015-05-09 17:04:28 -0500828 issuer. At most one of ``full_name`` or ``relative_name`` will be
829 non-None.
Paul Kehrer5a485522015-05-06 00:29:12 -0500830
831 .. attribute:: crl_issuer
832
833 :type: list of :class:`GeneralName` instances or None
834
835 Information about the issuer of the CRL.
836
837 .. attribute:: reasons
838
Paul Kehrer3fd02602015-05-09 19:46:13 -0500839 :type: frozenset of :class:`ReasonFlags` or None
Paul Kehrer5a485522015-05-06 00:29:12 -0500840
841 The reasons a given distribution point may be used for when performing
842 revocation checks.
843
844.. class:: ReasonFlags
845
846 .. versionadded:: 0.9
847
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500848 An enumeration for CRL reasons.
849
850 .. attribute:: unspecified
851
852 It is unspecified why the certificate was revoked. This reason cannot
853 be used as a reason flag in a :class:`DistributionPoint`.
Paul Kehrer5a485522015-05-06 00:29:12 -0500854
855 .. attribute:: key_compromise
856
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500857 This reason indicates that the private key was compromised.
Paul Kehrer5a485522015-05-06 00:29:12 -0500858
859 .. attribute:: ca_compromise
860
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500861 This reason indicates that the CA issuing the certificate was
862 compromised.
Paul Kehrer5a485522015-05-06 00:29:12 -0500863
864 .. attribute:: affiliation_changed
865
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500866 This reason indicates that the subject's name or other information has
867 changed.
Paul Kehrer5a485522015-05-06 00:29:12 -0500868
869 .. attribute:: superseded
870
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500871 This reason indicates that a certificate has been superseded.
Paul Kehrer5a485522015-05-06 00:29:12 -0500872
873 .. attribute:: cessation_of_operation
874
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500875 This reason indicates that the certificate is no longer required.
Paul Kehrer5a485522015-05-06 00:29:12 -0500876
877 .. attribute:: certificate_hold
878
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500879 This reason indicates that the certificate is on hold.
Paul Kehrer5a485522015-05-06 00:29:12 -0500880
881 .. attribute:: privilege_withdrawn
882
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500883 This reason indicates that the privilege granted by this certificate
884 have been withdrawn.
Paul Kehrer5a485522015-05-06 00:29:12 -0500885
886 .. attribute:: aa_compromise
887
Paul Kehrer4e8dacd2015-05-09 10:38:23 -0500888 When an attribute authority has been compromised.
889
890 .. attribute:: remove_from_crl
891
892 This reason indicates that the certificate was on hold and should be
893 removed from the CRL. This reason cannot be used as a reason flag
894 in a :class:`DistributionPoint`.
Paul Kehrer5a485522015-05-06 00:29:12 -0500895
Paul Kehrer0d210922015-04-28 17:31:07 -0500896.. class:: CertificatePolicies
897
898 .. versionadded:: 0.9
899
Paul Kehrer2e879742015-05-02 23:09:56 -0500900 The certificate policies extension is an iterable, containing one or more
901 :class:`PolicyInformation` instances.
Paul Kehrer0d210922015-04-28 17:31:07 -0500902
903Certificate Policies Classes
904~~~~~~~~~~~~~~~~~~~~~~~~~~~~
905
906These classes may be present within a :class:`CertificatePolicies` instance.
907
908.. class:: PolicyInformation
909
910 .. versionadded:: 0.9
911
912 Contains a policy identifier and an optional list of qualifiers.
913
914 .. attribute:: policy_identifier
915
916 :type: :class:`ObjectIdentifier`
917
918 .. attribute:: policy_qualifiers
919
920 :type: list
921
Paul Kehrerba35b3b2015-05-10 13:07:59 -0500922 A list consisting of :term:`text` and/or :class:`UserNotice` objects.
Paul Kehrer3f8ddeb2015-05-11 00:25:36 -0500923 If the value is text it is a pointer to the practice statement
924 published by the certificate authority. If it is a user notice it is
925 meant for display to the relying party when the certificate is
926 used.
Paul Kehrer2e879742015-05-02 23:09:56 -0500927
Paul Kehrer0d210922015-04-28 17:31:07 -0500928.. class:: UserNotice
929
930 .. versionadded:: 0.9
931
Paul Kehrer2e879742015-05-02 23:09:56 -0500932 User notices are intended for display to a relying party when a certificate
933 is used. In practice, few if any UIs expose this data and it is a rarely
934 encoded component.
935
Paul Kehrer0d210922015-04-28 17:31:07 -0500936 .. attribute:: notice_reference
937
938 :type: :class:`NoticeReference` or None
939
Paul Kehrer2e879742015-05-02 23:09:56 -0500940 The notice reference field names an organization and identifies,
941 by number, a particular statement prepared by that organization.
942
Paul Kehrer0d210922015-04-28 17:31:07 -0500943 .. attribute:: explicit_text
944
Paul Kehrer2e879742015-05-02 23:09:56 -0500945 This field includes an arbitrary textual statement directly in the
946 certificate.
947
Paul Kehrer0d210922015-04-28 17:31:07 -0500948 :type: :term:`text`
949
950.. class:: NoticeReference
951
Paul Kehrer2e879742015-05-02 23:09:56 -0500952 Notice reference can name an organization and provide information about
953 notices related to the certificate. For example, it might identify the
954 organization name and notice number 1. Application software could
955 have a notice file containing the current set of notices for the named
956 organization; the application would then extract the notice text from the
957 file and display it. In practice this is rarely seen.
958
Paul Kehrer0d210922015-04-28 17:31:07 -0500959 .. versionadded:: 0.9
960
961 .. attribute:: organization
962
Paul Kehrer66c61702015-05-12 16:39:18 -0500963 :type: :term:`text`
Paul Kehrer0d210922015-04-28 17:31:07 -0500964
Paul Kehrer3f8ddeb2015-05-11 00:25:36 -0500965 .. attribute:: notice_numbers
Paul Kehrer0d210922015-04-28 17:31:07 -0500966
Paul Kehrer66c61702015-05-12 16:39:18 -0500967 :type: list
Paul Kehrer0d210922015-04-28 17:31:07 -0500968
Paul Kehrer66c61702015-05-12 16:39:18 -0500969 A list of integers.
Paul Kehrer0d210922015-04-28 17:31:07 -0500970
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600971Object Identifiers
972~~~~~~~~~~~~~~~~~~
973
Paul Kehrer4bb46492015-02-07 16:59:14 -0600974X.509 elements are frequently identified by :class:`ObjectIdentifier`
975instances. The following common OIDs are available as constants.
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600976
Paul Kehrer56da2a52015-02-11 23:35:07 -0600977Name OIDs
978~~~~~~~~~
979
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600980.. data:: OID_COMMON_NAME
981
Paul Kehrerfb5ac9e2015-02-07 16:29:37 -0600982 Corresponds to the dotted string ``"2.5.4.3"``. Historically the domain
983 name would be encoded here for server certificates. :rfc:`2818` deprecates
984 this practice and names of that type should now be located in a
Paul Kehrer4bb46492015-02-07 16:59:14 -0600985 SubjectAlternativeName extension. This OID is typically seen in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -0600986
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600987.. data:: OID_COUNTRY_NAME
988
Paul Kehrer4bb46492015-02-07 16:59:14 -0600989 Corresponds to the dotted string ``"2.5.4.6"``. This OID is typically seen
990 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -0600991
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600992.. data:: OID_LOCALITY_NAME
993
Paul Kehrer4bb46492015-02-07 16:59:14 -0600994 Corresponds to the dotted string ``"2.5.4.7"``. This OID is typically seen
995 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -0600996
Paul Kehrer912d3fb2015-01-29 11:19:22 -0600997.. data:: OID_STATE_OR_PROVINCE_NAME
998
Paul Kehrer4bb46492015-02-07 16:59:14 -0600999 Corresponds to the dotted string ``"2.5.4.8"``. This OID is typically seen
1000 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001001
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001002.. data:: OID_ORGANIZATION_NAME
1003
Paul Kehrer4bb46492015-02-07 16:59:14 -06001004 Corresponds to the dotted string ``"2.5.4.10"``. This OID is typically seen
1005 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001006
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001007.. data:: OID_ORGANIZATIONAL_UNIT_NAME
1008
Paul Kehrer4bb46492015-02-07 16:59:14 -06001009 Corresponds to the dotted string ``"2.5.4.11"``. This OID is typically seen
1010 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001011
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001012.. data:: OID_SERIAL_NUMBER
1013
Paul Kehrerfb5ac9e2015-02-07 16:29:37 -06001014 Corresponds to the dotted string ``"2.5.4.5"``. This is distinct from the
1015 serial number of the certificate itself (which can be obtained with
Paul Kehrer4bb46492015-02-07 16:59:14 -06001016 :func:`Certificate.serial`). This OID is typically seen in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001017
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001018.. data:: OID_SURNAME
1019
Paul Kehrer4bb46492015-02-07 16:59:14 -06001020 Corresponds to the dotted string ``"2.5.4.4"``. This OID is typically seen
1021 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001022
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001023.. data:: OID_GIVEN_NAME
1024
Paul Kehrer4bb46492015-02-07 16:59:14 -06001025 Corresponds to the dotted string ``"2.5.4.42"``. This OID is typically seen
1026 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001027
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001028.. data:: OID_TITLE
1029
Paul Kehrer4bb46492015-02-07 16:59:14 -06001030 Corresponds to the dotted string ``"2.5.4.12"``. This OID is typically seen
1031 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001032
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001033.. data:: OID_GENERATION_QUALIFIER
1034
Paul Kehrer4bb46492015-02-07 16:59:14 -06001035 Corresponds to the dotted string ``"2.5.4.44"``. This OID is typically seen
1036 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001037
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001038.. data:: OID_DN_QUALIFIER
1039
Paul Kehrerfb5ac9e2015-02-07 16:29:37 -06001040 Corresponds to the dotted string ``"2.5.4.46"``. This specifies
1041 disambiguating information to add to the relative distinguished name of an
Paul Kehrer4bb46492015-02-07 16:59:14 -06001042 entry. See :rfc:`2256`. This OID is typically seen in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001043
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001044.. data:: OID_PSEUDONYM
1045
Paul Kehrer4bb46492015-02-07 16:59:14 -06001046 Corresponds to the dotted string ``"2.5.4.65"``. This OID is typically seen
1047 in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001048
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001049.. data:: OID_DOMAIN_COMPONENT
1050
Paul Kehrerfb5ac9e2015-02-07 16:29:37 -06001051 Corresponds to the dotted string ``"0.9.2342.19200300.100.1.25"``. A string
Paul Kehrer4bb46492015-02-07 16:59:14 -06001052 holding one component of a domain name. See :rfc:`4519`. This OID is
1053 typically seen in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001054
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001055.. data:: OID_EMAIL_ADDRESS
1056
Paul Kehrer4bb46492015-02-07 16:59:14 -06001057 Corresponds to the dotted string ``"1.2.840.113549.1.9.1"``. This OID is
1058 typically seen in X.509 names.
Paul Kehrer858b9b72015-02-05 09:50:31 -06001059
Paul Kehrer56da2a52015-02-11 23:35:07 -06001060Signature Algorithm OIDs
1061~~~~~~~~~~~~~~~~~~~~~~~~
1062
Paul Kehrer1a7ba872015-02-19 18:09:05 -06001063.. data:: OID_RSA_WITH_MD5
Paul Kehrer56da2a52015-02-11 23:35:07 -06001064
1065 Corresponds to the dotted string ``"1.2.840.113549.1.1.4"``. This is
1066 an MD5 digest signed by an RSA key.
1067
Paul Kehrer1a7ba872015-02-19 18:09:05 -06001068.. data:: OID_RSA_WITH_SHA1
Paul Kehrer56da2a52015-02-11 23:35:07 -06001069
1070 Corresponds to the dotted string ``"1.2.840.113549.1.1.5"``. This is
1071 a SHA1 digest signed by an RSA key.
1072
Paul Kehrer1a7ba872015-02-19 18:09:05 -06001073.. data:: OID_RSA_WITH_SHA224
Paul Kehrer56da2a52015-02-11 23:35:07 -06001074
1075 Corresponds to the dotted string ``"1.2.840.113549.1.1.14"``. This is
1076 a SHA224 digest signed by an RSA key.
1077
Paul Kehrer1a7ba872015-02-19 18:09:05 -06001078.. data:: OID_RSA_WITH_SHA256
Paul Kehrer56da2a52015-02-11 23:35:07 -06001079
1080 Corresponds to the dotted string ``"1.2.840.113549.1.1.11"``. This is
1081 a SHA256 digest signed by an RSA key.
1082
Paul Kehrer1a7ba872015-02-19 18:09:05 -06001083.. data:: OID_RSA_WITH_SHA384
Paul Kehrer56da2a52015-02-11 23:35:07 -06001084
1085 Corresponds to the dotted string ``"1.2.840.113549.1.1.12"``. This is
1086 a SHA384 digest signed by an RSA key.
1087
Paul Kehrer1a7ba872015-02-19 18:09:05 -06001088.. data:: OID_RSA_WITH_SHA512
Paul Kehrer56da2a52015-02-11 23:35:07 -06001089
1090 Corresponds to the dotted string ``"1.2.840.113549.1.1.13"``. This is
1091 a SHA512 digest signed by an RSA key.
1092
1093.. data:: OID_ECDSA_WITH_SHA224
1094
1095 Corresponds to the dotted string ``"1.2.840.10045.4.3.1"``. This is
1096 a SHA224 digest signed by an ECDSA key.
1097
1098.. data:: OID_ECDSA_WITH_SHA256
1099
1100 Corresponds to the dotted string ``"1.2.840.10045.4.3.2"``. This is
1101 a SHA256 digest signed by an ECDSA key.
1102
1103.. data:: OID_ECDSA_WITH_SHA384
1104
1105 Corresponds to the dotted string ``"1.2.840.10045.4.3.3"``. This is
1106 a SHA384 digest signed by an ECDSA key.
1107
1108.. data:: OID_ECDSA_WITH_SHA512
1109
1110 Corresponds to the dotted string ``"1.2.840.10045.4.3.4"``. This is
1111 a SHA512 digest signed by an ECDSA key.
1112
1113.. data:: OID_DSA_WITH_SHA1
1114
1115 Corresponds to the dotted string ``"1.2.840.10040.4.3"``. This is
1116 a SHA1 digest signed by a DSA key.
1117
1118.. data:: OID_DSA_WITH_SHA224
1119
1120 Corresponds to the dotted string ``"2.16.840.1.101.3.4.3.1"``. This is
1121 a SHA224 digest signed by a DSA key.
1122
1123.. data:: OID_DSA_WITH_SHA256
1124
Paul Kehrerfbb7ac82015-03-16 19:26:29 -05001125 Corresponds to the dotted string ``"2.16.840.1.101.3.4.3.2"``. This is
Paul Kehrer56da2a52015-02-11 23:35:07 -06001126 a SHA256 digest signed by a DSA key.
1127
Paul Kehrerffa2a152015-03-31 08:18:25 -05001128.. _eku_oids:
1129
Paul Kehrere1513fa2015-03-30 23:08:17 -05001130Extended Key Usage OIDs
1131~~~~~~~~~~~~~~~~~~~~~~~
1132
1133.. data:: OID_SERVER_AUTH
1134
1135 Corresponds to the dotted string ``"1.3.6.1.5.5.7.3.1"``. This is used to
1136 denote that a certificate may be used for TLS web server authentication.
1137
1138.. data:: OID_CLIENT_AUTH
1139
1140 Corresponds to the dotted string ``"1.3.6.1.5.5.7.3.2"``. This is used to
1141 denote that a certificate may be used for TLS web client authentication.
1142
1143.. data:: OID_CODE_SIGNING
1144
1145 Corresponds to the dotted string ``"1.3.6.1.5.5.7.3.3"``. This is used to
1146 denote that a certificate may be used for code signing.
1147
1148.. data:: OID_EMAIL_PROTECTION
1149
1150 Corresponds to the dotted string ``"1.3.6.1.5.5.7.3.4"``. This is used to
1151 denote that a certificate may be used for email protection.
1152
1153.. data:: OID_TIME_STAMPING
1154
1155 Corresponds to the dotted string ``"1.3.6.1.5.5.7.3.8"``. This is used to
1156 denote that a certificate may be used for time stamping.
1157
1158.. data:: OID_OCSP_SIGNING
1159
1160 Corresponds to the dotted string ``"1.3.6.1.5.5.7.3.9"``. This is used to
1161 denote that a certificate may be used for signing OCSP responses.
1162
Paul Kehrer3e6d5582015-05-02 21:57:56 -05001163Authority Information Access OIDs
1164~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1165
1166.. data:: OID_OCSP
1167
1168 Corresponds to the dotted string ``"1.3.6.1.5.5.7.48.1"``. Used as the
1169 identifier for OCSP data in :class:`AccessDescription` objects.
1170
1171.. data:: OID_CA_ISSUERS
1172
1173 Corresponds to the dotted string ``"1.3.6.1.5.5.7.48.2"``. Used as the
1174 identifier for CA issuer data in :class:`AccessDescription` objects.
1175
Paul Kehrer2e879742015-05-02 23:09:56 -05001176Policy Qualifier OIDs
1177~~~~~~~~~~~~~~~~~~~~~
1178
1179.. data:: OID_CPS_QUALIFIER
1180
Paul Kehrerba35b3b2015-05-10 13:07:59 -05001181 Corresponds to the dotted string ``"1.3.6.1.5.5.7.2.1"``.
Paul Kehrer2e879742015-05-02 23:09:56 -05001182
1183.. data:: OID_CPS_USER_NOTICE
1184
Paul Kehrerba35b3b2015-05-10 13:07:59 -05001185 Corresponds to the dotted string ``"1.3.6.1.5.5.7.2.2"``.
Paul Kehrer2e879742015-05-02 23:09:56 -05001186
Paul Kehrer5553d572015-03-23 21:08:01 -05001187.. _extension_oids:
1188
Paul Kehrer2bb94642015-03-21 09:54:17 -05001189Extension OIDs
1190~~~~~~~~~~~~~~
1191
1192.. data:: OID_BASIC_CONSTRAINTS
1193
1194 Corresponds to the dotted string ``"2.5.29.19"``. The identifier for the
Paul Kehrer611d3d32015-03-22 13:31:18 -05001195 :class:`BasicConstraints` extension type.
Paul Kehrer2bb94642015-03-21 09:54:17 -05001196
Paul Kehrercecbbba2015-03-30 14:58:38 -05001197.. data:: OID_KEY_USAGE
1198
1199 Corresponds to the dotted string ``"2.5.29.15"``. The identifier for the
1200 :class:`KeyUsage` extension type.
1201
Paul Kehrerd4f632e2015-05-12 08:25:42 -05001202.. data:: OID_SUBJECT_ALTERNATIVE_NAME
1203
1204 Corresponds to the dotted string ``"2.5.29.17"``. The identifier for the
1205 :class:`SubjectAlternativeName` extension type.
1206
1207.. data:: OID_SUBJECT_KEY_IDENTIFIER
1208
1209 Corresponds to the dotted string ``"2.5.29.14"``. The identifier for the
1210 :class:`SubjectKeyIdentifier` extension type.
1211
1212.. data:: OID_CRL_DISTRIBUTION_POINTS
1213
1214 Corresponds to the dotted string ``"2.5.29.31"``. The identifier for the
1215 :class:`CRLDistributionPoints` extension type.
1216
1217.. data:: OID_CERTIFICATE_POLICIES
1218
1219 Corresponds to the dotted string ``"2.5.29.32"``. The identifier for the
1220 :class:`CertificatePolicies` extension type.
1221
1222.. data:: OID_AUTHORITY_KEY_IDENTIFIER
1223
1224 Corresponds to the dotted string ``"2.5.29.35"``. The identifier for the
1225 :class:`AuthorityKeyIdentifier` extension type.
1226
1227.. data:: OID_EXTENDED_KEY_USAGE
1228
1229 Corresponds to the dotted string ``"2.5.29.37"``. The identifier for the
1230 :class:`ExtendedKeyUsage` extension type.
1231
1232.. data:: OID_AUTHORITY_INFORMATION_ACCESS
1233
1234 Corresponds to the dotted string ``"1.3.6.1.5.5.7.1.1"``. The identifier
1235 for the :class:`AuthorityInformationAccess` extension type.
Paul Kehrer56da2a52015-02-11 23:35:07 -06001236
Paul Kehrer912d3fb2015-01-29 11:19:22 -06001237Exceptions
1238~~~~~~~~~~
1239
Paul Kehrere76cd272014-12-14 19:00:51 -06001240.. class:: InvalidVersion
Paul Kehrera68fd332014-11-27 07:08:40 -10001241
1242 This is raised when an X.509 certificate has an invalid version number.
Paul Kehrer016e08a2014-11-26 09:41:18 -10001243
Paul Kehrerd5cccf72014-12-15 17:20:33 -06001244 .. attribute:: parsed_version
1245
Paul Kehrerbbffc402014-12-17 13:33:55 -06001246 :type: int
1247
1248 Returns the raw version that was parsed from the certificate.
Paul Kehrerd5cccf72014-12-15 17:20:33 -06001249
Paul Kehrerfbb7ac82015-03-16 19:26:29 -05001250.. class:: DuplicateExtension
1251
1252 This is raised when more than one X.509 extension of the same type is
1253 found within a certificate.
1254
1255 .. attribute:: oid
1256
1257 :type: :class:`ObjectIdentifier`
1258
1259 Returns the OID.
1260
1261.. class:: UnsupportedExtension
1262
1263 This is raised when a certificate contains an unsupported extension type.
1264
1265 .. attribute:: oid
1266
1267 :type: :class:`ObjectIdentifier`
1268
1269 Returns the OID.
1270
Paul Kehrerfa56a232015-03-17 13:14:03 -05001271.. class:: ExtensionNotFound
1272
1273 This is raised when calling :meth:`Extensions.get_extension_for_oid` with
1274 an extension OID that is not present in the certificate.
1275
1276 .. attribute:: oid
1277
1278 :type: :class:`ObjectIdentifier`
1279
1280 Returns the OID.
1281
Paul Kehrer9089c912015-04-20 22:15:20 -05001282.. class:: UnsupportedGeneralNameType
1283
1284 This is raised when a certificate contains an unsupported general name
1285 type in an extension.
1286
Paul Kehrerbed07352015-04-21 08:31:10 -05001287 .. attribute:: type
1288
Paul Kehrer0a621bf2015-04-22 09:22:56 -05001289 :type: int
1290
1291 The integer value of the unsupported type. The complete list of
1292 types can be found in `RFC 5280 section 4.2.1.6`_.
Paul Kehrerbed07352015-04-21 08:31:10 -05001293
Paul Kehrer016e08a2014-11-26 09:41:18 -10001294
1295.. _`public key infrastructure`: https://en.wikipedia.org/wiki/Public_key_infrastructure
Paul Kehrera68fd332014-11-27 07:08:40 -10001296.. _`TLS`: https://en.wikipedia.org/wiki/Transport_Layer_Security
Paul Kehrerc7c9a432015-04-19 09:20:13 -05001297.. _`RFC 5280 section 4.2.1.1`: https://tools.ietf.org/html/rfc5280#section-4.2.1.1
Paul Kehrer0a621bf2015-04-22 09:22:56 -05001298.. _`RFC 5280 section 4.2.1.6`: https://tools.ietf.org/html/rfc5280#section-4.2.1.6