summaryrefslogtreecommitdiffhomepage
path: root/common-algo.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2012-05-10 08:38:37 +0800
committerMatt Johnston <matt@ucc.asn.au>2012-05-10 08:38:37 +0800
commitc62e53807f6e7cf49544cbd7103929282a628311 (patch)
tree4877f61931c74cf0182d35dca67193049a2ccb95 /common-algo.c
parent10d7a358416e4125b05b0e28f4175659febdcb32 (diff)
- Add hmac-sha2-256 and hmac-sha2-512. Needs debugging, seems to be
getting keyed incorrectly --HG-- branch : sha2
Diffstat (limited to 'common-algo.c')
-rw-r--r--common-algo.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/common-algo.c b/common-algo.c
index acc3964..e65bd18 100644
--- a/common-algo.c
+++ b/common-algo.c
@@ -106,6 +106,14 @@ static const struct dropbear_hash dropbear_sha1 =
static const struct dropbear_hash dropbear_sha1_96 =
{&sha1_desc, 20, 12};
#endif
+#ifdef DROPBEAR_SHA2_256_HMAC
+static const struct dropbear_hash dropbear_sha2_256 =
+ {&sha256_desc, 32, 32};
+#endif
+#ifdef DROPBEAR_SHA2_512_HMAC
+static const struct dropbear_hash dropbear_sha2_512 =
+ {&sha512_desc, 64, 64};
+#endif
#ifdef DROPBEAR_MD5_HMAC
static const struct dropbear_hash dropbear_md5 =
{&md5_desc, 16, 16};
@@ -156,6 +164,12 @@ algo_type sshciphers[] = {
};
algo_type sshhashes[] = {
+#ifdef DROPBEAR_SHA2_256_HMAC
+// {"hmac-sha2-256", 0, &dropbear_sha2_256, 1, NULL},
+#endif
+#ifdef DROPBEAR_SHA2_512_HMAC
+// {"hmac-sha2-512", 0, &dropbear_sha2_512, 1, NULL},
+#endif
#ifdef DROPBEAR_SHA1_96_HMAC
{"hmac-sha1-96", 0, &dropbear_sha1_96, 1, NULL},
#endif