summaryrefslogtreecommitdiffhomepage
path: root/common-algo.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-04-06 23:18:26 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-04-06 23:18:26 +0800
commit7dc2f36c3e2d21455ae432da4d8f338e7dc0668c (patch)
treee09030cf950dca1c4a9b7a3e1cd8f633490570a9 /common-algo.c
parent90cfbe1f7a8138225c08a43a62ffe5a064a6297e (diff)
use sigtype where appropriate
Diffstat (limited to 'common-algo.c')
-rw-r--r--common-algo.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/common-algo.c b/common-algo.c
index 558aad2..28f6744 100644
--- a/common-algo.c
+++ b/common-algo.c
@@ -237,8 +237,13 @@ algo_type sshhostkey[] = {
#endif
#endif
#if DROPBEAR_RSA
+#if DROPBEAR_RSA_SHA256
+ {"rsa-sha2-256", DROPBEAR_SIGNKEY_RSA_SHA256, NULL, 1, NULL},
+#endif
+#if DROPBEAR_RSA_SHA1
{"ssh-rsa", DROPBEAR_SIGNKEY_RSA, NULL, 1, NULL},
#endif
+#endif
#if DROPBEAR_DSS
{"ssh-dss", DROPBEAR_SIGNKEY_DSS, NULL, 1, NULL},
#endif
@@ -311,24 +316,6 @@ algo_type sshkex[] = {
{NULL, 0, NULL, 0, NULL}
};
-/* algolen specifies the length of algo, algos is our local list to match
- * against.
- * Returns DROPBEAR_SUCCESS if we have a match for algo, DROPBEAR_FAILURE
- * otherwise */
-int have_algo(const char* algo, size_t algolen, const algo_type algos[]) {
-
- int i;
-
- for (i = 0; algos[i].name != NULL; i++) {
- if (strlen(algos[i].name) == algolen
- && (strncmp(algos[i].name, algo, algolen) == 0)) {
- return DROPBEAR_SUCCESS;
- }
- }
-
- return DROPBEAR_FAILURE;
-}
-
/* Output a comma separated list of algorithms to a buffer */
void buf_put_algolist(buffer * buf, const algo_type localalgos[]) {