diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-11-29 12:20:39 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-11-29 12:20:39 -0800 |
commit | 225a6da81e400139d9d1d61027614ac119e20a59 (patch) | |
tree | a7d1ffdc9c61262235db166ee41c81685e148c23 /tests/test_pkey.py | |
parent | a97e977d6970b33e619601f502776eb19e691d90 (diff) | |
parent | 184ddbc7e08e7918a381cb517d191be45304ae3a (diff) |
Merge branch '2.3' into 2.4
Diffstat (limited to 'tests/test_pkey.py')
-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 c745232b..7b2ab2ec 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -467,6 +467,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_ed25519_load_from_file_obj(self): with open(_support('test_ed25519.key')) as pkey_fileobj: key = Ed25519Key.from_private_key(pkey_fileobj) |