summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c20
-rw-r--r--src/ssh.c10
2 files changed, 30 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)
diff --git a/src/ssh.c b/src/ssh.c
index d647c4b..b76f4ad 100644
--- a/src/ssh.c
+++ b/src/ssh.c
@@ -407,3 +407,13 @@ void ssh_sftp_close(sftp_session sftp)
ssh_disconnect(ssh);
ssh_free(ssh);
}
+
+const char **mscp_ssh_ciphers(void)
+{
+ return ssh_ciphers();
+}
+
+const char **mscp_ssh_hmacs(void)
+{
+ return ssh_hmacs();
+}