mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
kex1: Use new dh pubkey import functions
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include "libssh/session.h"
|
#include "libssh/session.h"
|
||||||
#include "libssh/ssh1.h"
|
#include "libssh/ssh1.h"
|
||||||
#include "libssh/wrapper.h"
|
#include "libssh/wrapper.h"
|
||||||
|
#include "libssh/dh.h"
|
||||||
|
|
||||||
/* SSHv1 functions */
|
/* SSHv1 functions */
|
||||||
|
|
||||||
@@ -317,6 +318,7 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){
|
|||||||
int ko;
|
int ko;
|
||||||
uint32_t support_3DES = 0;
|
uint32_t support_3DES = 0;
|
||||||
uint32_t support_DES = 0;
|
uint32_t support_DES = 0;
|
||||||
|
int rc;
|
||||||
|
|
||||||
(void)type;
|
(void)type;
|
||||||
(void)user;
|
(void)user;
|
||||||
@@ -394,11 +396,10 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
session->next_crypto->server_pubkey = ssh_string_copy(hostkey);
|
rc = ssh_dh_import_next_pubkey_blob(session, hostkey);
|
||||||
if (session->next_crypto->server_pubkey == NULL) {
|
if (rc != SSH_OK) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
session->next_crypto->server_pubkey_type = "ssh-rsa1";
|
|
||||||
|
|
||||||
/* now, we must choose an encryption algo */
|
/* now, we must choose an encryption algo */
|
||||||
/* hardcode 3des */
|
/* hardcode 3des */
|
||||||
|
|||||||
Reference in New Issue
Block a user