diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-11-29 12:18:07 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-11-29 12:18:07 -0800 |
commit | bba1f99938508de41e23e557960f4c3c563263e2 (patch) | |
tree | 2a9e9948042233f00227d5bbc3dac2ba3615c36a | |
parent | c72b688286a4d897b9370acb355c17b6553e7302 (diff) |
Test proving #1039 / efficacy of #1051
-rw-r--r-- | tests/test_pkey.py | 10 |
1 files changed, 10 insertions, 0 deletions
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') |