mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-10-21 16:13:39 +03:00
tests: Enable all key exchange methods in ssh_ping
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -27,6 +27,7 @@ int main(int argc, char **argv)
|
||||
const char *banner = NULL;
|
||||
ssh_session session = NULL;
|
||||
const char *hostkeys = NULL;
|
||||
const char *kex = NULL;
|
||||
int rc = 1;
|
||||
|
||||
bool process_config = false;
|
||||
@@ -67,6 +68,13 @@ int main(int argc, char **argv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Enable all supported kex algorithms */
|
||||
kex = ssh_get_supported_methods(SSH_KEX);
|
||||
rc = ssh_options_set(session, SSH_OPTIONS_KEY_EXCHANGE, kex);
|
||||
if (rc < 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = ssh_connect(session);
|
||||
if (rc != SSH_OK) {
|
||||
fprintf(stderr, "Connection failed : %s\n", ssh_get_error(session));
|
||||
|
Reference in New Issue
Block a user