mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
kex: Add support for ed25519 on client connections.
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
4f5660e081
commit
01a6004171
16
src/kex.c
16
src/kex.c
@@ -75,9 +75,9 @@
|
|||||||
|
|
||||||
#ifdef HAVE_ECDH
|
#ifdef HAVE_ECDH
|
||||||
#define ECDH "ecdh-sha2-nistp256,"
|
#define ECDH "ecdh-sha2-nistp256,"
|
||||||
#define HOSTKEYS "ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss"
|
#define HOSTKEYS "ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss"
|
||||||
#else
|
#else
|
||||||
#define HOSTKEYS "ssh-rsa,ssh-dss"
|
#define HOSTKEYS "ssh-ed25519,ssh-rsa,ssh-dss"
|
||||||
#define ECDH ""
|
#define ECDH ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -483,8 +483,16 @@ void ssh_list_kex(struct ssh_kex_struct *kex) {
|
|||||||
*/
|
*/
|
||||||
static char *ssh_client_select_hostkeys(ssh_session session){
|
static char *ssh_client_select_hostkeys(ssh_session session){
|
||||||
char methods_buffer[128]={0};
|
char methods_buffer[128]={0};
|
||||||
static const char *preferred_hostkeys[]={"ecdsa-sha2-nistp521","ecdsa-sha2-nistp384",
|
static const char *preferred_hostkeys[] = {
|
||||||
"ecdsa-sha2-nistp256", "ssh-rsa", "ssh-dss", "ssh-rsa1", NULL};
|
"ssh-ed25519",
|
||||||
|
"ecdsa-sha2-nistp521",
|
||||||
|
"ecdsa-sha2-nistp384",
|
||||||
|
"ecdsa-sha2-nistp256",
|
||||||
|
"ssh-rsa",
|
||||||
|
"ssh-dss",
|
||||||
|
"ssh-rsa1",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
char **methods;
|
char **methods;
|
||||||
int i,j;
|
int i,j;
|
||||||
int needcoma=0;
|
int needcoma=0;
|
||||||
|
|||||||
Reference in New Issue
Block a user