Skip to content

Commit

Permalink
session server ssh UPDATE transport algs both dirs
Browse files Browse the repository at this point in the history
Fixes #523
  • Loading branch information
roman committed Jan 16, 2025
1 parent 2954396 commit 648ecdf
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/session_server_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1946,17 +1946,29 @@ nc_accept_ssh_session(struct nc_session *session, struct nc_server_ssh_opts *opt
rc = -1;
goto cleanup;
}
if (opts->encryption_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_CIPHERS_S_C, opts->encryption_algs)) {
rc = -1;
goto cleanup;
if (opts->encryption_algs) {
if (ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_CIPHERS_S_C, opts->encryption_algs)) {
rc = -1;
goto cleanup;
}
if (ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_CIPHERS_C_S, opts->encryption_algs)) {
rc = -1;
goto cleanup;
}
}
if (opts->kex_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_KEY_EXCHANGE, opts->kex_algs)) {
rc = -1;
goto cleanup;
}
if (opts->mac_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_HMAC_S_C, opts->mac_algs)) {
rc = -1;
goto cleanup;
if (opts->mac_algs) {
if (ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_HMAC_S_C, opts->mac_algs)) {
rc = -1;
goto cleanup;
}
if (ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_HMAC_C_S, opts->mac_algs)) {
rc = -1;
goto cleanup;
}
}

/* configure the ssh banner */
Expand Down

0 comments on commit 648ecdf

Please # to comment.