diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-11-29 12:20:43 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-11-29 12:20:43 -0800 |
commit | f2a7bb421cfa46e59f1c978bc30caf42311c8748 (patch) | |
tree | 45971cbb63ecbf75283829e465148f1c10e1b226 /tests | |
parent | f1562d76511890c648c657c45debe57b5112872f (diff) | |
parent | 225a6da81e400139d9d1d61027614ac119e20a59 (diff) |
Merge branch '2.4'
Diffstat (limited to 'tests')
-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) |