From 2cc5b5865c9e6f24bb7ab686fd6595ba3a231f92 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 28 Mar 2018 10:20:54 +0200 Subject: kex1: Use new dh pubkey import functions Signed-off-by: Andreas Schneider --- src/kex1.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kex1.c b/src/kex1.c index 3bd75ef1..ead206b4 100644 --- a/src/kex1.c +++ b/src/kex1.c @@ -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 */ -- cgit v1.2.3