From 9add80e455fc3f8cd160035c4c2d1ce05a50cdea Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 3 Aug 2015 17:53:14 +0100 Subject: reorder CertificateBuilder sign arguments --- tests/test_x509.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/test_x509.py b/tests/test_x509.py index ac20f649..ba35f64d 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -809,7 +809,7 @@ class TestRSACertificateRequest(object): not_valid_after ) - cert = builder.sign(backend, issuer_private_key, hashes.SHA1()) + cert = builder.sign(issuer_private_key, hashes.SHA1(), backend) assert cert.version is x509.Version.v3 assert cert.not_valid_before == not_valid_before @@ -969,7 +969,7 @@ class TestCertificateBuilder(object): builder = x509.CertificateBuilder() with pytest.raises(TypeError): - builder.sign(backend, private_key, object()) + builder.sign(private_key, object(), backend) @pytest.mark.requires_backend_interface(interface=DSABackend) @pytest.mark.requires_backend_interface(interface=X509Backend) @@ -981,7 +981,7 @@ class TestCertificateBuilder(object): builder = x509.CertificateBuilder() with pytest.raises(NotImplementedError): - builder.sign(backend, private_key, hashes.SHA512()) + builder.sign(private_key, hashes.SHA512(), backend) @pytest.mark.requires_backend_interface(interface=EllipticCurveBackend) @pytest.mark.requires_backend_interface(interface=X509Backend) @@ -994,7 +994,7 @@ class TestCertificateBuilder(object): builder = x509.CertificateBuilder() with pytest.raises(NotImplementedError): - builder.sign(backend, private_key, hashes.SHA512()) + builder.sign(private_key, hashes.SHA512(), backend) @pytest.mark.requires_backend_interface(interface=DSABackend) @pytest.mark.requires_backend_interface(interface=X509Backend) @@ -1027,7 +1027,7 @@ class TestCertificateBuilder(object): not_valid_after ) - cert = builder.sign(backend, issuer_private_key, hashes.SHA1()) + cert = builder.sign(issuer_private_key, hashes.SHA1(), backend) assert cert.version is x509.Version.v3 assert cert.not_valid_before == not_valid_before @@ -1076,7 +1076,7 @@ class TestCertificateBuilder(object): not_valid_after ) - cert = builder.sign(backend, issuer_private_key, hashes.SHA1()) + cert = builder.sign(issuer_private_key, hashes.SHA1(), backend) assert cert.version is x509.Version.v3 assert cert.not_valid_before == not_valid_before @@ -1117,7 +1117,7 @@ class TestCertificateBuilder(object): ) with pytest.raises(ValueError): - builder.sign(backend, issuer_private_key, hashes.SHA512()) + builder.sign(issuer_private_key, hashes.SHA512(), backend) @pytest.mark.requires_backend_interface(interface=X509Backend) -- cgit v1.2.3 From b8f11bca26c1819ccdfb2a36e18375b19a91e5da Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 3 Aug 2015 18:01:13 +0100 Subject: missed one --- tests/hazmat/backends/test_openssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index c2a4f544..0f2c80a6 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -531,7 +531,7 @@ class TestOpenSSLSignX509Certificate(object): ) with pytest.raises(NotImplementedError): - builder.sign(backend, private_key, hashes.SHA1()) + builder.sign(private_key, hashes.SHA1(), backend) class TestOpenSSLSerialisationWithOpenSSL(object): -- cgit v1.2.3