summaryrefslogtreecommitdiffhomepage
path: root/tests/test_pkey.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-11-29 12:20:39 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-11-29 12:20:39 -0800
commit225a6da81e400139d9d1d61027614ac119e20a59 (patch)
treea7d1ffdc9c61262235db166ee41c81685e148c23 /tests/test_pkey.py
parenta97e977d6970b33e619601f502776eb19e691d90 (diff)
parent184ddbc7e08e7918a381cb517d191be45304ae3a (diff)
Merge branch '2.3' into 2.4
Diffstat (limited to 'tests/test_pkey.py')
-rw-r--r--tests/test_pkey.py10
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)