From 89e64c631ec8dee41ec4de888548d36887b6ec98 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sat, 19 Aug 2017 17:16:13 +0200 Subject: Pointer parameter could be declared as pointing to const --- ecdsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ecdsa.c') diff --git a/ecdsa.c b/ecdsa.c index ed378be..d7615e0 100644 --- a/ecdsa.c +++ b/ecdsa.c @@ -15,7 +15,7 @@ int signkey_is_ecdsa(enum signkey_type type) || type == DROPBEAR_SIGNKEY_ECDSA_NISTP521; } -enum signkey_type ecdsa_signkey_type(ecc_key * key) { +enum signkey_type ecdsa_signkey_type(const ecc_key * key) { #if DROPBEAR_ECC_256 if (key->dp == ecc_curve_nistp256.dp) { return DROPBEAR_SIGNKEY_ECDSA_NISTP256; @@ -154,7 +154,7 @@ void buf_put_ecdsa_priv_key(buffer *buf, ecc_key *key) { buf_putmpint(buf, key->k); } -void buf_put_ecdsa_sign(buffer *buf, ecc_key *key, buffer *data_buf) { +void buf_put_ecdsa_sign(buffer *buf, const ecc_key *key, const buffer *data_buf) { /* Based on libtomcrypt's ecc_sign_hash but without the asn1 */ int err = DROPBEAR_FAILURE; struct dropbear_ecc_curve *curve = NULL; @@ -272,7 +272,7 @@ out: } -int buf_ecdsa_verify(buffer *buf, ecc_key *key, buffer *data_buf) { +int buf_ecdsa_verify(buffer *buf, const ecc_key *key, const buffer *data_buf) { /* Based on libtomcrypt's ecc_verify_hash but without the asn1 */ int ret = DROPBEAR_FAILURE; hash_state hs; -- cgit v1.2.3