From 0112b0242717e394ec35aad8d0c8311a47dfa577 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Tue, 16 Jun 2015 17:51:18 -0500 Subject: 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 --- docs/x509.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'docs') 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 -- cgit v1.2.3