diff options
author | Ga?l PORTAY <gael.portay@gmail.com> | 2015-05-02 22:24:02 +0200 |
---|---|---|
committer | Ga?l PORTAY <gael.portay@gmail.com> | 2015-05-02 22:24:02 +0200 |
commit | 4a3a535eee8eeb99cf3100b7e3f0d04c9c5a6acf (patch) | |
tree | aadb956b49ac28410532d46ad1bb6459a164906c /ecdsa.c | |
parent | 2a1c060bc623fc51568abc383a08874b54e5add1 (diff) | |
download | dropbear-4a3a535eee8eeb99cf3100b7e3f0d04c9c5a6acf.tar.gz |
Turn local key_indent variable into char *
Diffstat (limited to 'ecdsa.c')
-rw-r--r-- | ecdsa.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -140,11 +140,11 @@ 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); - buf_putstring(buf, key_ident, strlen(key_ident)); + snprintf(key_ident, sizeof(key_ident), "ecdsa-sha2-%s", curve->name); + buf_putstring(buf, (const unsigned char *) 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,8 +222,8 @@ 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); - buf_putstring(buf, key_ident, strlen(key_ident)); + snprintf(key_ident, sizeof(key_ident), "ecdsa-sha2-%s", curve->name); + buf_putstring(buf, (const unsigned char *) key_ident, strlen(key_ident)); /* enough for nistp521 */ sigbuf = buf_new(200); buf_putmpint(sigbuf, (mp_int*)r); |