diff options
-rw-r--r-- | paramiko/ed25519key.py | 4 | ||||
-rw-r--r-- | paramiko/hostkeys.py | 1 | ||||
-rw-r--r-- | tests/test_client.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index d9c92aa2..e1a8a732 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -52,7 +52,7 @@ class Ed25519Key(PKey): if msg is not None: if msg.get_text() != "ssh-ed25519": raise SSHException("Invalid key") - verifying_key = nacl.signing.VerifyKey(msg.get_bytes(32)) + verifying_key = nacl.signing.VerifyKey(msg.get_binary()) elif filename is not None: with open(filename, "r") as f: data = self._read_private_key("OPENSSH", f) @@ -164,7 +164,7 @@ class Ed25519Key(PKey): v = self._verifying_key m = Message() m.add_string("ssh-ed25519") - m.add_bytes(v.encode()) + m.add_string(v.encode()) return m.asbytes() def get_name(self): diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index 7586b903..f3cb29db 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -35,6 +35,7 @@ from paramiko.dsskey import DSSKey from paramiko.rsakey import RSAKey from paramiko.util import get_logger, constant_time_bytes_eq from paramiko.ecdsakey import ECDSAKey +from paramiko.ed25519key import Ed25519Key from paramiko.ssh_exception import SSHException diff --git a/tests/test_client.py b/tests/test_client.py index eb6aa7b3..a340be00 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -43,7 +43,7 @@ FINGERPRINTS = { 'ssh-dss': b'\x44\x78\xf0\xb9\xa2\x3c\xc5\x18\x20\x09\xff\x75\x5b\xc1\xd2\x6c', 'ssh-rsa': b'\x60\x73\x38\x44\xcb\x51\x86\x65\x7f\xde\xda\xa2\x2b\x5a\x57\xd5', 'ecdsa-sha2-nistp256': b'\x25\x19\xeb\x55\xe6\xa1\x47\xff\x4f\x38\xd2\x75\x6f\xa5\xd5\x60', - 'ssh-ed25519': b'\x1d\xf3\xefoj\x95\x99\xb7\xedq\x7f&\xba\xb0CD', + 'ssh-ed25519': b'\xb3\xd5"\xaa\xf9u^\xe8\xcd\x0e\xea\x02\xb9)\xa2\x80', } |