aboutsummaryrefslogtreecommitdiff
path: root/src/kex1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kex1.c')
-rw-r--r--src/kex1.c7
1 files 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 */