summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2024-04-29 18:03:41 +0900
committerRyo Nakamura <upa@haeena.net>2024-04-29 18:03:41 +0900
commitab6649f29e7a24e02a5c363a17a79601607930aa (patch)
tree58b06494b5b9cede91933f9bef0293c068d27587 /src/main.c
parent7c5314ea11b636ff1790d543c9b45ba5ade04e12 (diff)
add available ciphers and hmacs on help print (#20)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index f17d2ad..3562374 100644
--- a/src/main.c
+++ b/src/main.c
@@ -75,6 +75,26 @@ void usage(bool print_help)
" -N enable Nagle's algorithm (default disabled)\n"
" -h print this help\n"
"\n");
+
+ const char **ciphers = mscp_ssh_ciphers();
+ const char **hmacs = mscp_ssh_hmacs();
+ int n;
+
+ printf("Available ciphers: ");
+ for (n = 0; ciphers[n] != NULL; n++) {
+ printf("%s", ciphers[n]);
+ if (ciphers[n + 1])
+ printf(", ");
+ }
+ printf("\n\n");
+
+ printf("Available hmacs: ");
+ for (n = 0; hmacs[n] != NULL; n++) {
+ printf("%s", hmacs[n]);
+ if (hmacs[n + 1])
+ printf(", ");
+ }
+ printf("\n\n");
}
char *strip_brackets(char *s)