diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-03-28 10:20:54 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-03-28 10:20:54 +0200 |
commit | 2cc5b5865c9e6f24bb7ab686fd6595ba3a231f92 (patch) | |
tree | ee7ca05b1302c9dcf7cae5d600031ea69dc43ac4 | |
parent | 8d65edb41f8ea57a4ca22254b46c95345845a047 (diff) | |
download | libssh-2cc5b5865c9e6f24bb7ab686fd6595ba3a231f92.tar.gz libssh-2cc5b5865c9e6f24bb7ab686fd6595ba3a231f92.tar.xz libssh-2cc5b5865c9e6f24bb7ab686fd6595ba3a231f92.zip |
kex1: Use new dh pubkey import functions
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/kex1.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -35,6 +35,7 @@ #include "libssh/session.h" #include "libssh/ssh1.h" #include "libssh/wrapper.h" +#include "libssh/dh.h" /* SSHv1 functions */ @@ -317,6 +318,7 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){ int ko; uint32_t support_3DES = 0; uint32_t support_DES = 0; + int rc; (void)type; (void)user; @@ -394,11 +396,10 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){ goto error; } - session->next_crypto->server_pubkey = ssh_string_copy(hostkey); - if (session->next_crypto->server_pubkey == NULL) { + rc = ssh_dh_import_next_pubkey_blob(session, hostkey); + if (rc != SSH_OK) { goto error; } - session->next_crypto->server_pubkey_type = "ssh-rsa1"; /* now, we must choose an encryption algo */ /* hardcode 3des */ |