Skip to content

Commit ecd2575

Browse files
author
roman
committed
server config BUGFIX set ssh encrypt alg correctly
Fixes #523
1 parent 4c7858c commit ecd2575

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/server_config.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,6 +2617,14 @@ nc_server_config_encryption_alg(const struct lyd_node *node, enum nc_operation o
26172617

26182618
/* get the algorithm name and append it to supported algs */
26192619
alg = ((struct lyd_node_term *)node)->value.ident->name;
2620+
2621+
/* YANG IDs cannot begin with a number, need to convert them to the correct form */
2622+
if (!strcmp(alg, "triple-des-cbc")) {
2623+
alg = "3des-cbc";
2624+
} else if (!strcmp(alg, "triple-des-ctr")) {
2625+
alg = "3des-ctr";
2626+
}
2627+
26202628
if (nc_server_config_transport_params(alg, &opts->encryption_algs, op)) {
26212629
ret = 1;
26222630
goto cleanup;

0 commit comments

Comments
 (0)