aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorIan Cordasco <ian.cordasco@rackspace.com>2015-06-16 17:51:18 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2015-06-24 13:35:50 -0500
commit0112b0242717e394ec35aad8d0c8311a47dfa577 (patch)
tree97a27401d25f7e8bec558ce8e4f69a155a1782f0 /docs
parentf0a50ae80aa613aa5cc6c4696113a844bf338ecb (diff)
downloadcryptography-0112b0242717e394ec35aad8d0c8311a47dfa577.tar.gz
cryptography-0112b0242717e394ec35aad8d0c8311a47dfa577.tar.bz2
cryptography-0112b0242717e394ec35aad8d0c8311a47dfa577.zip
Address code review regarding style and gc
- Use keyword arguments for x509.BasicConstraints in several places - Use SHA256 instead of SHA1 in documented examples - Give function variables meaningful names in _encode_asn1_str - Accept a x509.BasicConstraints object in _encode_basic_constraints - Properly garbage-collect some things - Raise a NotImplementedError instead of a ValueError
Diffstat (limited to 'docs')
-rw-r--r--docs/x509.rst8
1 files changed, 2 insertions, 6 deletions
diff --git a/docs/x509.rst b/docs/x509.rst
index 0f55e8e4..aa8e2593 100644
--- a/docs/x509.rst
+++ b/docs/x509.rst
@@ -491,18 +491,14 @@ X.509 CSR (Certificate Signing Request) Builder Object
... x509.NameAttribute(x509.OID_COMMON_NAME, 'cryptography.io'),
... ]))
>>> buidlder = builder.add_extension(
- ... x509.BasicConstraints(False, None), critical=True,
+ ... x509.BasicConstraints(ca=False, path_length=None), critical=True,
... )
>>> request = builder.sign(
- ... default_backend(), private_key, hashes.SHA1()
+ ... default_backend(), private_key, hashes.SHA256()
... )
>>> isinstance(request, x509.CertificateSigningRequest)
True
- .. method:: __init__()
-
- Creates an empty certificate signing request.
-
.. method:: subject_name(name)
:param name: The :class:`~cryptography.x509.Name` of the certificate