diff options
author | Jakub Jelen <jjelen@redhat.com> | 2020-04-14 15:50:52 +0200 |
---|---|---|
committer | Jakub Jelen <jjelen@redhat.com> | 2020-04-20 14:14:33 +0200 |
commit | 04ae110c612f0dabc03882a52bf5be56be560020 (patch) | |
tree | b6d1747bc086313efd37ff3b109ff54ca3c06be2 | |
parent | 9ac2d1470763c416f018f3065725d2d7a6c6c366 (diff) | |
download | libssh-04ae110c612f0dabc03882a52bf5be56be560020.tar.gz libssh-04ae110c612f0dabc03882a52bf5be56be560020.tar.xz libssh-04ae110c612f0dabc03882a52bf5be56be560020.zip |
pkd: Enable all hostkeys
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
-rw-r--r-- | tests/pkd/pkd_daemon.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pkd/pkd_daemon.c b/tests/pkd/pkd_daemon.c index 910b3749..239bdd36 100644 --- a/tests/pkd/pkd_daemon.c +++ b/tests/pkd/pkd_daemon.c @@ -300,6 +300,7 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args) } if (!ssh_fips_mode()) { + const char *all_hostkeys = NULL; /* Add methods not enabled by default */ #define GEX_SHA1 "diffie-hellman-group-exchange-sha1" default_kex = ssh_kex_get_default_methods(SSH_KEX); @@ -331,6 +332,15 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args) pkderr("ssh_bind_options_set Ciphers S-C: %s\n", ssh_get_error(b)); goto outclose; } + + /* Enable all hostkey algorithms */ + all_hostkeys = ssh_kex_get_supported_method(SSH_HOSTKEYS); + rc = ssh_bind_options_set(b, SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS, all_hostkeys); + if (rc != 0) { + pkderr("ssh_bind_options_set Hostkeys: %s\n", ssh_get_error(b)); + goto outclose; + } + } s = ssh_new(); |