aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_ec.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-11-01 09:21:50 +0900
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-11-01 09:21:50 +0900
commit849f12026c8c2cfc9cf7cb8f9a1d0ea92b4df62d (patch)
treea398a7d6d6f51e39942caefd132ce7a17821b794 /tests/hazmat/primitives/test_ec.py
parenta0cb27c6dcd09761f8a93cba106539ecb6135f9f (diff)
parent91000fa68912fe033d6290d2ad5bd91c6818430d (diff)
downloadcryptography-849f12026c8c2cfc9cf7cb8f9a1d0ea92b4df62d.tar.gz
cryptography-849f12026c8c2cfc9cf7cb8f9a1d0ea92b4df62d.tar.bz2
cryptography-849f12026c8c2cfc9cf7cb8f9a1d0ea92b4df62d.zip
Merge pull request #2458 from PeterHamilton/add-elliptic-curve-test-fixtures
Adding elliptic curve test fixtures
Diffstat (limited to 'tests/hazmat/primitives/test_ec.py')
-rw-r--r--tests/hazmat/primitives/test_ec.py13
1 files changed, 2 insertions, 11 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)