aboutsummaryrefslogtreecommitdiffstats
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/test_x509.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index dc45815c..fcd57229 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -586,7 +586,7 @@ class TestRSACertificateRequest(object):
x509.Extension(
x509.OID_BASIC_CONSTRAINTS,
True,
- x509.BasicConstraints(True, 1),
+ x509.BasicConstraints(ca=True, path_length=1),
),
]
@@ -747,7 +747,7 @@ class TestCertificateSigningRequestBuilder(object):
x509.NameAttribute(x509.OID_COMMON_NAME, 'cryptography.io'),
])
).add_extension(
- x509.BasicConstraints(False, None), critical=True,
+ x509.BasicConstraints(ca=False, path_length=None), critical=True,
).sign(
backend, private_key, hashes.SHA1()
)