aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-05-22 19:01:18 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-06-12 10:17:54 +0200
commitdc35bbbeb1342be08051bfc25ca562e9ad3fcfa7 (patch)
tree421ace8a71e424daa71abe180ce2582516b855ec /src
parent2db2a4e170a3a2ec88576c86969ba810bb439f64 (diff)
downloadlibssh-dc35bbbeb1342be08051bfc25ca562e9ad3fcfa7.tar.gz
libssh-dc35bbbeb1342be08051bfc25ca562e9ad3fcfa7.tar.xz
libssh-dc35bbbeb1342be08051bfc25ca562e9ad3fcfa7.zip
server: Use default methods instead of all
Previously, when no methods were set, the server would enable all supported methods. This changes this behaviour by setting only the default methods. The server in pkd_daemon.c was changed to set explicitly all the supported methods to keep the previous behaviour. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c
index adb6ff7c..1fb68118 100644
--- a/src/server.c
+++ b/src/server.c
@@ -142,7 +142,7 @@ int server_set_kex(ssh_session session)
if (session->opts.wanted_methods[SSH_HOSTKEYS]) {
allowed = session->opts.wanted_methods[SSH_HOSTKEYS];
} else {
- allowed = ssh_kex_get_supported_method(SSH_HOSTKEYS);
+ allowed = ssh_kex_get_default_methods(SSH_HOSTKEYS);
}
/* It is expected for the list of allowed hostkeys to be ordered by
@@ -164,7 +164,7 @@ int server_set_kex(ssh_session session)
for (i = 0; i < 10; i++) {
if ((wanted = session->opts.wanted_methods[i]) == NULL) {
- wanted = ssh_kex_get_supported_method(i);
+ wanted = ssh_kex_get_default_methods(i);
}
server->methods[i] = strdup(wanted);
if (server->methods[i] == NULL) {