summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-11-29 12:19:30 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-11-29 12:19:30 -0800
commit184ddbc7e08e7918a381cb517d191be45304ae3a (patch)
tree5706ac527182b90952fe7abfc8eec3d1e5cb8f71 /tests
parentf324c83eba454d06d43bfd2e6fd4a52f1d6e04f4 (diff)
parentbba1f99938508de41e23e557960f4c3c563263e2 (diff)
Merge branch '2.2' into 2.3
Diffstat (limited to 'tests')
-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 a9205a18..42d8e6bb 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_ed25519_load_from_file_obj(self):
with open(test_path('test_ed25519.key')) as pkey_fileobj:
key = Ed25519Key.from_private_key(pkey_fileobj)