diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-06-26 19:57:18 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-06-26 19:57:18 -0400 |
commit | b3b0fbe2fb4f3c6939c05ff90e0201fb78c51074 (patch) | |
tree | e8b8a504fe64179906ce965467a46d520eb4438d /tests/test_x509.py | |
parent | 354fc56e6a9781f3f2213537c3c65d7e720dfcb4 (diff) | |
download | cryptography-b3b0fbe2fb4f3c6939c05ff90e0201fb78c51074.tar.gz cryptography-b3b0fbe2fb4f3c6939c05ff90e0201fb78c51074.tar.bz2 cryptography-b3b0fbe2fb4f3c6939c05ff90e0201fb78c51074.zip |
Make the parameter ordering in sign() consistent with other code
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r-- | tests/test_x509.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index ee83ed2d..971f149c 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -689,7 +689,7 @@ class TestCertificateSigningRequestBuilder(object): builder = x509.CertificateSigningRequestBuilder() with pytest.raises(TypeError): - builder.sign(backend, private_key, 'NotAHash') + builder.sign(private_key, 'NotAHash', backend) @pytest.mark.requires_backend_interface(interface=RSABackend) def test_build_ca_request_with_rsa(self, backend): @@ -701,9 +701,7 @@ class TestCertificateSigningRequestBuilder(object): ]) ).add_extension( x509.BasicConstraints(ca=True, path_length=2), critical=True - ).sign( - backend, private_key, hashes.SHA1() - ) + ).sign(private_key, hashes.SHA1(), backend) assert isinstance(request.signature_hash_algorithm, hashes.SHA1) public_key = request.public_key() @@ -730,9 +728,7 @@ class TestCertificateSigningRequestBuilder(object): ]) ).add_extension( x509.BasicConstraints(ca=True, path_length=2), critical=True - ).sign( - backend, private_key, hashes.SHA1() - ) + ).sign(private_key, hashes.SHA1(), backend) loaded_request = x509.load_pem_x509_csr( request.public_bytes(encoding=serialization.Encoding.PEM), backend @@ -753,9 +749,7 @@ class TestCertificateSigningRequestBuilder(object): ]) ).add_extension( x509.BasicConstraints(ca=False, path_length=None), critical=True, - ).sign( - backend, private_key, hashes.SHA1() - ) + ).sign(private_key, hashes.SHA1(), backend) assert isinstance(request.signature_hash_algorithm, hashes.SHA1) public_key = request.public_key() @@ -785,9 +779,7 @@ class TestCertificateSigningRequestBuilder(object): ]) ).add_extension( x509.BasicConstraints(ca=True, path_length=2), critical=True - ).sign( - backend, private_key, hashes.SHA1() - ) + ).sign(private_key, hashes.SHA1(), backend) assert isinstance(request.signature_hash_algorithm, hashes.SHA1) public_key = request.public_key() @@ -816,9 +808,7 @@ class TestCertificateSigningRequestBuilder(object): ]) ).add_extension( x509.BasicConstraints(ca=True, path_length=2), critical=True - ).sign( - backend, private_key, hashes.SHA1() - ) + ).sign(private_key, hashes.SHA1(), backend) assert isinstance(request.signature_hash_algorithm, hashes.SHA1) public_key = request.public_key() |