Skip to content

Commit

Permalink
server config BUGFIX set ssh encrypt alg correctly
Browse files Browse the repository at this point in the history
Fixes #523
  • Loading branch information
roman committed Jan 16, 2025
1 parent 4c7858c commit ecd2575
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/server_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2617,6 +2617,14 @@ nc_server_config_encryption_alg(const struct lyd_node *node, enum nc_operation o

/* get the algorithm name and append it to supported algs */
alg = ((struct lyd_node_term *)node)->value.ident->name;

/* YANG IDs cannot begin with a number, need to convert them to the correct form */
if (!strcmp(alg, "triple-des-cbc")) {
alg = "3des-cbc";
} else if (!strcmp(alg, "triple-des-ctr")) {
alg = "3des-ctr";
}

if (nc_server_config_transport_params(alg, &opts->encryption_algs, op)) {
ret = 1;
goto cleanup;
Expand Down

0 comments on commit ecd2575

Please sign in to comment.