@@ -133,11 +133,6 @@ the root of trust:
133
133
134
134
.. versionadded :: 43.0.0
135
135
136
- .. versionchanged :: 45.0.0
137
- ``verification_time `` and ``max_chain_depth `` were deprecated and will be
138
- removed in version 46.0.0.
139
- The new ``policy `` property should be used to access these values instead.
140
-
141
136
A ClientVerifier verifies client certificates.
142
137
143
138
It contains and describes various pieces of configurable path
@@ -180,12 +175,6 @@ the root of trust:
180
175
181
176
.. versionadded :: 42.0.0
182
177
183
- .. versionchanged :: 45.0.0
184
- ``subject ``, ``verification_time `` and ``max_chain_depth `` were deprecated and will be
185
- removed in version 46.0.0.
186
- The new ``policy `` property should be used to access these values instead.
187
-
188
-
189
178
A ServerVerifier verifies server certificates.
190
179
191
180
It contains and describes various pieces of configurable path
@@ -233,7 +222,7 @@ the root of trust:
233
222
.. versionadded :: 42.0.0
234
223
235
224
.. versionchanged :: 45.0.0
236
- Added the ``extension_policies `` method.
225
+ Added the ``extension_policies `` method.
237
226
Removed the ``new_ `` prefix from all parameter names.
238
227
239
228
A PolicyBuilder provides a builder-style interface for constructing a
@@ -284,11 +273,11 @@ the root of trust:
284
273
.. warning ::
285
274
If the PolicyBuilder will be used to build a :class: `ServerVerifier `, the EE extension policy
286
275
`must require ` the :class: `~cryptography.x509.SubjectAlternativeName ` extension to be present.
287
- All CA extension policies `must require ` the :class: `~cryptography.x509.BasicConstraints `
276
+ All CA extension policies `must require ` the :class: `~cryptography.x509.BasicConstraints `
288
277
extension to be present.
289
278
290
279
:param ExtensionPolicy ca_policy: The CA extension policy to use.
291
- :param ExtensionPolicy ee_policy: The EE extension policy to use.
280
+ :param ExtensionPolicy ee_policy: The EE extension policy to use.
292
281
293
282
:returns: A new instance of :class: `PolicyBuilder `
294
283
@@ -337,7 +326,7 @@ the root of trust:
337
326
338
327
.. staticmethod :: permit_all()
339
328
340
- Creates an ExtensionPolicy that does not put any constraints on a certificate's extensions.
329
+ Creates an ExtensionPolicy that does not put any constraints on a certificate's extensions.
341
330
This can serve as a base for a fully custom extension policy.
342
331
343
332
:returns: An instance of :class: `ExtensionPolicy `
@@ -371,17 +360,17 @@ the root of trust:
371
360
.. method :: may_be_present(extension_type, criticality, validator_cb)
372
361
373
362
Specifies that the extension identified by `extension_type ` is optional.
374
- If it is present, it must conform to the given criticality constraint.
363
+ If it is present, it must conform to the given criticality constraint.
375
364
An optional validator callback may be provided.
376
365
377
- If a validator callback is provided, the callback will be invoked
378
- when :meth: `ClientVerifier.verify ` or :meth: `ServerVerifier.verify ` is called on a verifier
366
+ If a validator callback is provided, the callback will be invoked
367
+ when :meth: `ClientVerifier.verify ` or :meth: `ServerVerifier.verify ` is called on a verifier
379
368
that uses the extension policy. For details on the callback signature, see :type: `MaybeExtensionValidatorCallback `.
380
369
381
370
:param type[ExtensionType] extension_type: A concrete class derived from :type: `~cryptography.x509.ExtensionType `
382
371
indicating which extension may be present.
383
372
:param Criticality criticality: The criticality of the extension
384
- :param validator_cb: An optional Python callback to validate the extension value.
373
+ :param validator_cb: An optional Python callback to validate the extension value.
385
374
Must accept extensions of type `extension_type `.
386
375
:type validator_cb: :type: `MaybeExtensionValidatorCallback ` or None
387
376
@@ -392,8 +381,8 @@ the root of trust:
392
381
Specifies that the extension identified by `extension_type`` must be present
393
382
and conform to the given criticality constraint. An optional validator callback may be provided.
394
383
395
- If a validator callback is provided, the callback will be invoked
396
- when :meth: `ClientVerifier.verify ` or :meth: `ServerVerifier.verify ` is called on a verifier
384
+ If a validator callback is provided, the callback will be invoked
385
+ when :meth: `ClientVerifier.verify ` or :meth: `ServerVerifier.verify ` is called on a verifier
397
386
that uses the extension policy. For details on the callback signature, see :type: `PresentExtensionValidatorCallback `.
398
387
399
388
:param type[ExtensionType] extension_type: A concrete class derived from :type: `~cryptography.x509.ExtensionType `
@@ -416,7 +405,7 @@ the root of trust:
416
405
The extension must be marked as critical.
417
406
418
407
.. attribute :: AGNOSTIC
419
-
408
+
420
409
The extension may be marked either as critical or non-critical.
421
410
422
411
.. attribute :: NON_CRITICAL
@@ -427,7 +416,7 @@ the root of trust:
427
416
428
417
.. versionadded :: 45.0.0
429
418
430
- Represents a policy for certificate verification. Passed to extension validator callbacks and
419
+ Represents a policy for certificate verification. Passed to extension validator callbacks and
431
420
accessible via :class: `ClientVerifier ` and :class: `ServerVerifier `.
432
421
433
422
.. attribute :: max_chain_depth
@@ -438,7 +427,7 @@ the root of trust:
438
427
439
428
.. attribute :: subject
440
429
441
- The subject used during verification.
430
+ The subject used during verification.
442
431
Will be None if the verifier is a :class: `ClientVerifier `.
443
432
444
433
:type: x509.verification.Subject or None
@@ -463,7 +452,7 @@ the root of trust:
463
452
464
453
.. type :: MaybeExtensionValidatorCallback
465
454
:canonical: Callable[[Policy, Certificate, Optional[ExtensionType]], None]
466
-
455
+
467
456
.. versionadded :: 45.0.0
468
457
469
458
@@ -475,7 +464,7 @@ the root of trust:
475
464
:param Policy policy: The verification policy.
476
465
:param Certificate certificate: The certificate being verified.
477
466
:param ExtensionType or None extension: The extension value or `None ` if the extension is not present.
478
-
467
+
479
468
:returns: An extension validator callback must return `None `.
480
469
If the validation fails, the validator must raise an exception.
481
470
0 commit comments