summaryrefslogtreecommitdiff
path: root/ecdsa.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
commit6e3355f4c3a5b5e9a4ef33b02478fa6811870730 (patch)
tree4671c7337586ae813f7e5e9a5d67ae95ab747f61 /ecdsa.c
parentc0e5fca0bd82e13dce2eb4c64eaf85d427e33608 (diff)
downloaddropbear-6e3355f4c3a5b5e9a4ef33b02478fa6811870730.tar.gz
buf_getstring and buf_putstring now use non-unsigned char*
Diffstat (limited to 'ecdsa.c')
-rw-r--r--ecdsa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ecdsa.c b/ecdsa.c
index f5c7755..5568131 100644
--- a/ecdsa.c
+++ b/ecdsa.c
@@ -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);