aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hamilton <peter.hamilton@jhuapl.edu>2015-10-30 08:49:38 -0400
committerPeter Hamilton <peter.hamilton@jhuapl.edu>2015-10-30 08:49:38 -0400
commit91000fa68912fe033d6290d2ad5bd91c6818430d (patch)
treea398a7d6d6f51e39942caefd132ce7a17821b794
parent51bc8e0e77da8fce933b9d2722136d6ace167db0 (diff)
downloadcryptography-91000fa68912fe033d6290d2ad5bd91c6818430d.tar.gz
cryptography-91000fa68912fe033d6290d2ad5bd91c6818430d.tar.bz2
cryptography-91000fa68912fe033d6290d2ad5bd91c6818430d.zip
Swapping modified x509 test with modified ec test
-rw-r--r--tests/hazmat/primitives/test_ec.py13
-rw-r--r--tests/test_x509.py5
2 files changed, 4 insertions, 14 deletions
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py
index d086e999..a0417fbd 100644
--- a/tests/hazmat/primitives/test_ec.py
+++ b/tests/hazmat/primitives/test_ec.py
@@ -22,6 +22,7 @@ from cryptography.hazmat.primitives.asymmetric.utils import (
encode_rfc6979_signature
)
+from .fixtures_ec import EC_KEY_SECP384R1
from ...utils import (
load_fips_ecdsa_key_pair_vectors, load_fips_ecdsa_signing_vectors,
load_kasvs_ecdh_vectors, load_vectors_from_file,
@@ -928,17 +929,7 @@ class TestECDH(object):
pemfile.read().encode(), None, backend
)
)
- public_key = ec.EllipticCurvePublicNumbers(
- int(
- "3411592940847846511444973873421894778212895963519463384397662"
- "6983900466205627792914181900767401599528349662185720855"
- ),
- int(
- "3632819834244394334395622140197408878581471655319641017478501"
- "4862750487889436098934993486739984469019130932307943998"
- ),
- ec.SECP384R1(),
- ).public_key(backend)
+ public_key = EC_KEY_SECP384R1.public_numbers.public_key(backend)
with pytest.raises(ValueError):
key.exchange(ec.ECDH(), public_key)
diff --git a/tests/test_x509.py b/tests/test_x509.py
index fb1f5239..4072ef15 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -29,7 +29,6 @@ from cryptography.x509.oid import (
)
from .hazmat.primitives.fixtures_dsa import DSA_KEY_2048
-from .hazmat.primitives.fixtures_ec import EC_KEY_SECP192R1, EC_KEY_SECT163K1
from .hazmat.primitives.fixtures_rsa import RSA_KEY_2048, RSA_KEY_512
from .hazmat.primitives.test_ec import _skip_curve_unsupported
from .utils import load_vectors_from_file
@@ -1089,8 +1088,8 @@ class TestRSACertificateRequest(object):
]
def test_build_cert_printable_string_country_name(self, backend):
- issuer_private_key = EC_KEY_SECP192R1.private_key(backend)
- subject_private_key = EC_KEY_SECT163K1.private_key(backend)
+ issuer_private_key = RSA_KEY_2048.private_key(backend)
+ subject_private_key = RSA_KEY_2048.private_key(backend)
not_valid_before = datetime.datetime(2002, 1, 1, 12, 1)
not_valid_after = datetime.datetime(2030, 12, 31, 8, 30)