Mercurial > dropbear
diff ecc.c @ 1459:06d52bcb8094
Pointer parameter could be declared as pointing to const
author | Francois Perrad <francois.perrad@gadz.org> |
---|---|
date | Sat, 19 Aug 2017 17:16:13 +0200 |
parents | 750ec4ec4cbe |
children | b0c3b46372dc |
line wrap: on
line diff
--- a/ecc.c Sat Aug 12 20:51:58 2017 +0200 +++ b/ecc.c Sat Aug 19 17:16:13 2017 +0200 @@ -82,7 +82,7 @@ /* Copied from libtomcrypt ecc_import.c (version there is static), modified for different mp_int pointer without LTC_SOURCE */ -static int ecc_is_point(ecc_key *key) +static int ecc_is_point(const ecc_key *key) { mp_int *prime, *b, *t1, *t2; int err; @@ -213,7 +213,7 @@ /* a modified version of libtomcrypt's "ecc_shared_secret" to output a mp_int instead. */ -mp_int * dropbear_ecc_shared_secret(ecc_key *public_key, ecc_key *private_key) +mp_int * dropbear_ecc_shared_secret(ecc_key *public_key, const ecc_key *private_key) { ecc_point *result = NULL; mp_int *prime = NULL, *shared_secret = NULL;