aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-22 10:49:42 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2016-11-21 21:49:42 -0500
commit191e6e90bf6e37404bb65a4bf9b8a3211d77395d (patch)
treec7887edbdde244db184fd88b41432589f1ed2096 /tests/hazmat
parentca4f79ede7483148ba6869ea7fdc514b4051633b (diff)
downloadcryptography-191e6e90bf6e37404bb65a4bf9b8a3211d77395d.tar.gz
cryptography-191e6e90bf6e37404bb65a4bf9b8a3211d77395d.tar.bz2
cryptography-191e6e90bf6e37404bb65a4bf9b8a3211d77395d.zip
error if private_value is <= 0 in ec.derive_private_key (#3273)
Diffstat (limited to 'tests/hazmat')
-rw-r--r--tests/hazmat/primitives/test_ec.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py
index d2b570dd..7127071f 100644
--- a/tests/hazmat/primitives/test_ec.py
+++ b/tests/hazmat/primitives/test_ec.py
@@ -125,6 +125,9 @@ def test_derive_private_key_errors(backend):
with pytest.raises(TypeError):
ec.derive_private_key(10, 'five', backend)
+ with pytest.raises(ValueError):
+ ec.derive_private_key(-7, curve, backend)
+
def test_ec_numbers():
numbers = ec.EllipticCurvePrivateNumbers(