diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-01-25 21:55:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-25 21:55:25 +0800 |
commit | e64e25e4d69ddb8f1c7fb8bbdcd09817cae4ca55 (patch) | |
tree | 679ecdd500c6355f7b11dbef36c66906065a8ee2 /ecdsa.c | |
parent | ba23b823dcec4203dcee59204f0a7dac1a390d96 (diff) | |
parent | 598056d1686127285c389cacbdd20707c350d05a (diff) |
Merge pull request #49 from fperrad/20170812_lint
Some linting, const parameters
Diffstat (limited to 'ecdsa.c')
-rw-r--r-- | ecdsa.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |