aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_serialization.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-12-25 09:46:33 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-12-25 09:46:33 -0800
commit9dd8005cc0acfad841245187c3373501d801fe0c (patch)
tree179af33164e24632a9cd316fd5929c11fa7f4171 /tests/hazmat/primitives/test_serialization.py
parent8165db59374c7ce83e3ad34abf883195d1ec7b8b (diff)
downloadcryptography-9dd8005cc0acfad841245187c3373501d801fe0c.tar.gz
cryptography-9dd8005cc0acfad841245187c3373501d801fe0c.tar.bz2
cryptography-9dd8005cc0acfad841245187c3373501d801fe0c.zip
Get us up to 100% coverage
Diffstat (limited to 'tests/hazmat/primitives/test_serialization.py')
-rw-r--r--tests/hazmat/primitives/test_serialization.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py
index fdd88a82..8c79f640 100644
--- a/tests/hazmat/primitives/test_serialization.py
+++ b/tests/hazmat/primitives/test_serialization.py
@@ -889,3 +889,13 @@ class TestECDSASSHSerialization(object):
)
with pytest.raises(NotImplementedError):
load_ssh_public_key(ssh_key, backend)
+
+ def test_load_ssh_public_key_ecdsa_nist_p256_bad_curve_name(self, backend):
+ ssh_key = (
+ # The curve name in here is changed to be "nistp255".
+ b"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAy"
+ b"NTUAAABBBGG2MfkHXp0UkxUyllDzWNBAImsvt5t7pFtTXegZK2WbGxml8zMrgWi5"
+ b"teIg1TO03/FD9hbpBFgBeix3NrCFPls= root@cloud-server-01"
+ )
+ with pytest.raises(ValueError):
+ load_ssh_public_key(ssh_key, backend)