From bba1f99938508de41e23e557960f4c3c563263e2 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 29 Nov 2017 12:18:07 -0800 Subject: Test proving #1039 / efficacy of #1051 --- tests/test_pkey.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 9bb3c44c..7ffc4b41 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -466,6 +466,16 @@ class KeyTest(unittest.TestCase): self.assertTrue(not pub.can_sign()) self.assertEqual(key, pub) + def test_ed25519_nonbytes_password(self): + # https://github.com/paramiko/paramiko/issues/1039 + key = Ed25519Key.from_private_key_file( + test_path('test_ed25519_password.key'), + # NOTE: not a bytes. Amusingly, the test above for same key DOES + # explicitly cast to bytes...code smell! + 'abc123', + ) + # No exception -> it's good. Meh. + def test_keyfile_is_actually_encrypted(self): # Read an existing encrypted private key file_ = test_path('test_rsa_password.key') -- cgit v1.2.1