summaryrefslogtreecommitdiffstats
path: root/crypto/ecdh.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-02-24 15:46:58 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-03-09 18:34:27 +0800
commit5527dfb6ddac2aac98c2939f27840cb47abd5693 (patch)
tree5a898221ea9be92a0c8c93a6b5a5375b79da259c /crypto/ecdh.c
parentcd220ae6c7fbb0c80c3301e011e1baf4f352e497 (diff)
downloadlinux-5527dfb6ddac2aac98c2939f27840cb47abd5693.tar.bz2
crypto: kpp - constify buffer passed to crypto_kpp_set_secret()
Constify the buffer passed to crypto_kpp_set_secret() and kpp_alg.set_secret, since it is never modified. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecdh.c')
-rw-r--r--crypto/ecdh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index 3de289806d67..63ca33771e4e 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -38,7 +38,8 @@ static unsigned int ecdh_supported_curve(unsigned int curve_id)
}
}
-static int ecdh_set_secret(struct crypto_kpp *tfm, void *buf, unsigned int len)
+static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,
+ unsigned int len)
{
struct ecdh_ctx *ctx = ecdh_get_ctx(tfm);
struct ecdh params;