summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-08 00:10:57 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-08 00:10:57 +0800
commit8dd2f70401bb7a6dfc92396e6398a44640d06245 (patch)
tree86348860784e0814317cf6e97695259d8d99bdce /bignum.c
parentcb5ab7d220319bf69068e3f8ac8c6285b949e681 (diff)
downloaddropbear-8dd2f70401bb7a6dfc92396e6398a44640d06245.tar.gz
- Fix various hardcoded uses of SHA1
- rename curves to nistp256 etc - fix svr-auth.c TRACE problem
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bignum.c b/bignum.c
index cf50ddc..886568d 100644
--- a/bignum.c
+++ b/bignum.c
@@ -60,7 +60,8 @@ void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) {
}
/* hash the ssh representation of the mp_int mp */
-void sha1_process_mp(hash_state *hs, mp_int *mp) {
+void hash_process_mp(const struct ltc_hash_descriptor *hash_desc,
+ hash_state *hs, mp_int *mp) {
int i;
buffer * buf;
@@ -68,8 +69,6 @@ void sha1_process_mp(hash_state *hs, mp_int *mp) {
buf = buf_new(512 + 20); /* max buffer is a 4096 bit key,
plus header + some leeway*/
buf_putmpint(buf, mp);
- i = buf->pos;
- buf_setpos(buf, 0);
- sha1_process(hs, buf_getptr(buf, i), i);
+ hash_desc->process(hs, buf->data, buf->len);
buf_free(buf);
}