diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-11-14 21:36:45 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-11-14 21:36:45 +0800 |
commit | a65f84db38eebcde867ab4bfc5b916f61e95bfa2 (patch) | |
tree | d5c32671e64204b67b96dcbf2d9d2b828c11b7b9 /ecc.c | |
parent | 8c8ecec3e96525d498077da81084302371bab4da (diff) |
- Some fixes for old compilers like tru64 v4 from Daniel Richard G.
- Don't warn about blocking random device for prngd
Diffstat (limited to 'ecc.c')
-rw-r--r-- | ecc.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -9,23 +9,26 @@ /* .dp members are filled out by dropbear_ecc_fill_dp() at startup */ #ifdef DROPBEAR_ECC_256 struct dropbear_ecc_curve ecc_curve_nistp256 = { - .ltc_size = 32, - .hash_desc = &sha256_desc, - .name = "nistp256" + 32, /* .ltc_size */ + NULL, /* .dp */ + &sha256_desc, /* .hash_desc */ + "nistp256" /* .name */ }; #endif #ifdef DROPBEAR_ECC_384 struct dropbear_ecc_curve ecc_curve_nistp384 = { - .ltc_size = 48, - .hash_desc = &sha384_desc, - .name = "nistp384" + 48, /* .ltc_size */ + NULL, /* .dp */ + &sha384_desc, /* .hash_desc */ + "nistp384" /* .name */ }; #endif #ifdef DROPBEAR_ECC_521 struct dropbear_ecc_curve ecc_curve_nistp521 = { - .ltc_size = 66, - .hash_desc = &sha512_desc, - .name = "nistp521" + 66, /* .ltc_size */ + NULL, /* .dp */ + &sha512_desc, /* .hash_desc */ + "nistp521" /* .name */ }; #endif @@ -137,8 +140,9 @@ static int ecc_is_point(ecc_key *key) /* For the "ephemeral public key octet string" in ECDH (rfc5656 section 4) */ void buf_put_ecc_raw_pubkey_string(buffer *buf, ecc_key *key) { unsigned long len = key->dp->size*2 + 1; + int err; buf_putint(buf, len); - int err = ecc_ansi_x963_export(key, buf_getwriteptr(buf, len), &len); + err = ecc_ansi_x963_export(key, buf_getwriteptr(buf, len), &len); if (err != CRYPT_OK) { dropbear_exit("ECC error"); } |