aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-03-19 09:35:40 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-03-19 18:32:31 -0400
commitf29c3c55e86714dcdb81dd3a4625f9707966be78 (patch)
tree423765902fc7bbbf7001f89ecd52cfbad1f150be /tests/hazmat/primitives
parent49c8e2146492e83315145f803dfb0b746203e8e4 (diff)
downloadcryptography-f29c3c55e86714dcdb81dd3a4625f9707966be78.tar.gz
cryptography-f29c3c55e86714dcdb81dd3a4625f9707966be78.tar.bz2
cryptography-f29c3c55e86714dcdb81dd3a4625f9707966be78.zip
rename some things
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r--tests/hazmat/primitives/test_rsa.py22
-rw-r--r--tests/hazmat/primitives/utils.py12
2 files changed, 17 insertions, 17 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py
index ae0b4538..cf201212 100644
--- a/tests/hazmat/primitives/test_rsa.py
+++ b/tests/hazmat/primitives/test_rsa.py
@@ -27,7 +27,7 @@ from cryptography.exceptions import (
from cryptography.hazmat.primitives import hashes, interfaces
from cryptography.hazmat.primitives.asymmetric import padding, rsa
-from .utils import generate_rsa_signature_test
+from .utils import generate_rsa_verification_test
from ...utils import (
load_pkcs1_vectors, load_rsa_nist_vectors, load_vectors_from_file
)
@@ -754,7 +754,7 @@ class TestRSAVerification(object):
)
@pytest.mark.rsa
class TestRSAPSSMGF1VerificationSHA1(object):
- test_rsa_pss_mgf1_sha1 = generate_rsa_signature_test(
+ test_rsa_pss_mgf1_sha1 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -773,7 +773,7 @@ class TestRSAPSSMGF1VerificationSHA1(object):
)
@pytest.mark.rsa
class TestRSAPSSMGF1VerificationSHA224(object):
- test_rsa_pss_mgf1_sha224 = generate_rsa_signature_test(
+ test_rsa_pss_mgf1_sha224 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -792,7 +792,7 @@ class TestRSAPSSMGF1VerificationSHA224(object):
)
@pytest.mark.rsa
class TestRSAPSSMGF1VerificationSHA256(object):
- test_rsa_pss_mgf1_sha256 = generate_rsa_signature_test(
+ test_rsa_pss_mgf1_sha256 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -811,7 +811,7 @@ class TestRSAPSSMGF1VerificationSHA256(object):
)
@pytest.mark.rsa
class TestRSAPSSMGF1VerificationSHA384(object):
- test_rsa_pss_mgf1_sha384 = generate_rsa_signature_test(
+ test_rsa_pss_mgf1_sha384 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -830,7 +830,7 @@ class TestRSAPSSMGF1VerificationSHA384(object):
)
@pytest.mark.rsa
class TestRSAPSSMGF1VerificationSHA512(object):
- test_rsa_pss_mgf1_sha512 = generate_rsa_signature_test(
+ test_rsa_pss_mgf1_sha512 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -849,7 +849,7 @@ class TestRSAPSSMGF1VerificationSHA512(object):
)
@pytest.mark.rsa
class TestRSAPKCS1SHA1Verification(object):
- test_rsa_pkcs1v15_verify_sha1 = generate_rsa_signature_test(
+ test_rsa_pkcs1v15_verify_sha1 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -866,7 +866,7 @@ class TestRSAPKCS1SHA1Verification(object):
)
@pytest.mark.rsa
class TestRSAPKCS1SHA224Verification(object):
- test_rsa_pkcs1v15_verify_sha224 = generate_rsa_signature_test(
+ test_rsa_pkcs1v15_verify_sha224 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -883,7 +883,7 @@ class TestRSAPKCS1SHA224Verification(object):
)
@pytest.mark.rsa
class TestRSAPKCS1SHA256Verification(object):
- test_rsa_pkcs1v15_verify_sha256 = generate_rsa_signature_test(
+ test_rsa_pkcs1v15_verify_sha256 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -900,7 +900,7 @@ class TestRSAPKCS1SHA256Verification(object):
)
@pytest.mark.rsa
class TestRSAPKCS1SHA384Verification(object):
- test_rsa_pkcs1v15_verify_sha384 = generate_rsa_signature_test(
+ test_rsa_pkcs1v15_verify_sha384 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
@@ -917,7 +917,7 @@ class TestRSAPKCS1SHA384Verification(object):
)
@pytest.mark.rsa
class TestRSAPKCS1SHA512Verification(object):
- test_rsa_pkcs1v15_verify_sha512 = generate_rsa_signature_test(
+ test_rsa_pkcs1v15_verify_sha512 = generate_rsa_verification_test(
load_rsa_nist_vectors,
os.path.join("asymmetric", "RSA", "FIPS_186-2"),
[
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py
index 5db9a193..89d0f5f1 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -375,20 +375,20 @@ def generate_hkdf_test(param_loader, path, file_names, algorithm):
return test_hkdf
-def generate_rsa_signature_test(param_loader, path, file_names, hash_alg,
- pad_cls):
+def generate_rsa_verification_test(param_loader, path, file_names, hash_alg,
+ pad_cls):
all_params = _load_all_params(path, file_names, param_loader)
all_params = [i for i in all_params
if i["algorithm"] == hash_alg.name.upper()]
@pytest.mark.parametrize("params", all_params)
- def test_rsa_signature(self, backend, params):
- rsa_signature_test(backend, params, hash_alg, pad_cls)
+ def test_rsa_verification(self, backend, params):
+ rsa_verification_test(backend, params, hash_alg, pad_cls)
- return test_rsa_signature
+ return test_rsa_verification
-def rsa_signature_test(backend, params, hash_alg, pad_cls):
+def rsa_verification_test(backend, params, hash_alg, pad_cls):
public_key = rsa.RSAPublicKey(
public_exponent=params["public_exponent"],
modulus=params["modulus"]