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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
Eric Biggers 2017-02-24 15:46:58 -08:00 • committed by Herbert Xu
commit 5527dfb6dd
4 changed files with 8 additions and 6 deletions

View file

@ -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;