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 | 1a4db21fe4e06f4a5e5b74e35027091370b54abb (patch) | |
tree | 7543bf0e7a5d133c5564dd0ddcf35685bc308a98 /ecdsa.c | |
parent | e7ac4c1ab3eee827d781ececf6c7342c432b91d3 (diff) |
buf_getstring and buf_putstring now use non-unsigned char*
Diffstat (limited to 'ecdsa.c')
-rw-r--r-- | ecdsa.c | 10 |
1 files changed, 5 insertions, 5 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")) @@ -144,8 +144,8 @@ void buf_put_ecdsa_pub_key(buffer *buf, ecc_key *key) { curve = curve_for_dp(key->dp); 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, (const unsigned char *) curve->name, strlen(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); } @@ -223,7 +223,7 @@ void buf_put_ecdsa_sign(buffer *buf, ecc_key *key, buffer *data_buf) { } 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, key_ident, strlen(key_ident)); /* enough for nistp521 */ sigbuf = buf_new(200); buf_putmpint(sigbuf, (mp_int*)r); |