summaryrefslogtreecommitdiffhomepage
path: root/ecc.c
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2017-08-19 17:16:13 +0200
committerFrancois Perrad <francois.perrad@gadz.org>2017-08-19 17:16:13 +0200
commit89e64c631ec8dee41ec4de888548d36887b6ec98 (patch)
tree91fc3aee54e9b9cac7ec893ddf91cb944e3fc220 /ecc.c
parent468656b4aab5bc0040e3ecbfd7f66f52a15da76d (diff)
Pointer parameter could be declared as pointing to const
Diffstat (limited to 'ecc.c')
-rw-r--r--ecc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecc.c b/ecc.c
index 9d97b5d..574b4aa 100644
--- a/ecc.c
+++ b/ecc.c
@@ -82,7 +82,7 @@ ecc_key * new_ecc_key(void) {
/* 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 @@ ecc_key * buf_get_ecc_raw_pubkey(buffer *buf, const struct dropbear_ecc_curve *c
/* 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;