summaryrefslogtreecommitdiffhomepage
path: root/ecc.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-07 01:36:42 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-07 01:36:42 +0800
commitc6bdc810abab5b58aba26a7618c49f3dac58ebd6 (patch)
tree2594798a88e46aff08f0b350925b4a77eb0a6341 /ecc.c
parenta8135dec1e8b9360274679c9ff89cb98cda87930 (diff)
ecc kind of works, needs fixing/testing
--HG-- branch : ecc
Diffstat (limited to 'ecc.c')
-rw-r--r--ecc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ecc.c b/ecc.c
index 8b3422c..0f988ac 100644
--- a/ecc.c
+++ b/ecc.c
@@ -110,7 +110,7 @@ error:
ecc_key * buf_get_ecc_pubkey(buffer *buf, const struct dropbear_ecc_curve *curve) {
ecc_key *key = NULL;
int ret = DROPBEAR_FAILURE;
- const int size = curve->dp->size;
+ const unsigned int size = curve->dp->size;
buf_setpos(buf, 0);
unsigned int len = buf->len;
unsigned char first = buf_getbyte(buf);
@@ -123,6 +123,7 @@ ecc_key * buf_get_ecc_pubkey(buffer *buf, const struct dropbear_ecc_curve *curve
}
key = new_ecc_key();
+ key->dp = curve->dp;
if (mp_read_unsigned_bin(key->pubkey.x, buf_getptr(buf, size), size) != MP_OKAY) {
goto out;