aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAndre Caron <andre.l.caron@gmail.com>2015-06-06 20:04:44 -0400
committerIan Cordasco <graffatcolmingov@gmail.com>2015-06-24 13:35:49 -0500
commit472fd6991e05735e00fdca7fbe2573a44fdabd17 (patch)
tree69b03b302645f3ca7e24306cb67a392dabbbaded /docs
parentd259ee51abae5a35e34f16ad74bfb1c62aa433d7 (diff)
downloadcryptography-472fd6991e05735e00fdca7fbe2573a44fdabd17.tar.gz
cryptography-472fd6991e05735e00fdca7fbe2573a44fdabd17.tar.bz2
cryptography-472fd6991e05735e00fdca7fbe2573a44fdabd17.zip
Changes builder extension API.
Diffstat (limited to 'docs')
-rw-r--r--docs/x509.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/x509.rst b/docs/x509.rst
index a2a3ded7..52117c84 100644
--- a/docs/x509.rst
+++ b/docs/x509.rst
@@ -490,11 +490,9 @@ X.509 CSR (Certificate Signing Request) Builder Object
>>> builder = builder.set_subject_name(x509.Name([
... x509.NameAttribute(x509.OID_COMMON_NAME, 'cryptography.io'),
... ]))
- >>> buidlder = builder.add_extension(x509.Extension(
- ... x509.OID_BASIC_CONSTRAINTS,
- ... True,
- ... x509.BasicConstraints(False, None),
- ... ))
+ >>> buidlder = builder.add_extension(
+ ... x509.BasicConstraints(False, None), critical=True,
+ ... )
>>> request = builder.sign(
... default_backend(), private_key, hashes.SHA1()
... )
@@ -510,9 +508,11 @@ X.509 CSR (Certificate Signing Request) Builder Object
:param name: The :class:`Name` of the certificate subject.
:returns: A new `CertificateSigningRequestBuilder`.
- .. method:: add_extension(extension)
+ .. method:: add_extension(extension, critical=False)
:param extension: The :class:`Extension` to add to the request.
+ :param critical: Set to `True` if the extension must be understood and
+ handled by whoever reads the certificate.
:returns: A new `CertificateSigningRequestBuilder`.
.. method:: sign(backend, private_key, algorithm)