diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-06-04 23:08:50 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-06-04 23:08:50 +0800 |
commit | d96a52541f0f89836e99fea2d1bb8e3f4a1f4144 (patch) | |
tree | 4eedfa1c5b7e94fb6d930e2528c4d3eb6c27a7c2 /ecdsa.c | |
parent | ecd850521816dc2a78792fc53dd9c6c80d5d1b91 (diff) | |
parent | 9fdab3ced8374b991bfadce0056cf5bdf7cfb3d6 (diff) |
Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
Diffstat (limited to 'ecdsa.c')
-rw-r--r-- | ecdsa.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -83,9 +83,9 @@ ecc_key *buf_get_ecdsa_pub_key(buffer* buf) { ecc_key *new_key = NULL; /* string "ecdsa-sha2-[identifier]" */ - key_ident = buf_getstring(buf, &key_ident_len); + key_ident = (unsigned char*)buf_getstring(buf, &key_ident_len); /* string "[identifier]" */ - identifier = buf_getstring(buf, &identifier_len); + identifier = (unsigned char*)buf_getstring(buf, &identifier_len); if (key_ident_len != identifier_len + strlen("ecdsa-sha2-")) { TRACE(("Bad identifier lengths")) @@ -140,10 +140,10 @@ ecc_key *buf_get_ecdsa_priv_key(buffer *buf) { void buf_put_ecdsa_pub_key(buffer *buf, ecc_key *key) { struct dropbear_ecc_curve *curve = NULL; - unsigned char key_ident[30]; + char key_ident[30]; curve = curve_for_dp(key->dp); - snprintf((char*)key_ident, sizeof(key_ident), "ecdsa-sha2-%s", curve->name); + snprintf(key_ident, sizeof(key_ident), "ecdsa-sha2-%s", curve->name); buf_putstring(buf, key_ident, strlen(key_ident)); buf_putstring(buf, curve->name, strlen(curve->name)); buf_put_ecc_raw_pubkey_string(buf, key); @@ -161,7 +161,7 @@ void buf_put_ecdsa_sign(buffer *buf, ecc_key *key, buffer *data_buf) { hash_state hs; unsigned char hash[64]; void *e = NULL, *p = NULL, *s = NULL, *r; - unsigned char key_ident[30]; + char key_ident[30]; buffer *sigbuf = NULL; TRACE(("buf_put_ecdsa_sign")) @@ -222,7 +222,7 @@ void buf_put_ecdsa_sign(buffer *buf, ecc_key *key, buffer *data_buf) { } } - snprintf((char*)key_ident, sizeof(key_ident), "ecdsa-sha2-%s", curve->name); + snprintf(key_ident, sizeof(key_ident), "ecdsa-sha2-%s", curve->name); buf_putstring(buf, key_ident, strlen(key_ident)); /* enough for nistp521 */ sigbuf = buf_new(200); |