summaryrefslogtreecommitdiffstats
path: root/crypto/dh_helper.c
diff options
context:
space:
mode:
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>2017-09-29 11:21:05 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2017-10-12 16:55:05 +0200
commit5b3f3a8bede7d3af2dc9ea20b0ad971d4e5e83cc (patch)
tree382538ba9f49bbb3bdbcfb6c3b2745881865ab56 /crypto/dh_helper.c
parentcrypto: dh - return unsigned int for dh_data_size() (diff)
downloadlinux-5b3f3a8bede7d3af2dc9ea20b0ad971d4e5e83cc.tar.xz
linux-5b3f3a8bede7d3af2dc9ea20b0ad971d4e5e83cc.zip
crypto: dh - return unsigned value for crypto_dh_key_len()
DH_KPP_SECRET_MIN_SIZE and dh_data_size() are both returning unsigned values. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/dh_helper.c')
-rw-r--r--crypto/dh_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dh_helper.c b/crypto/dh_helper.c
index 69869dad344a..a413b311e568 100644
--- a/crypto/dh_helper.c
+++ b/crypto/dh_helper.c
@@ -33,7 +33,7 @@ static inline unsigned int dh_data_size(const struct dh *p)
return p->key_size + p->p_size + p->g_size;
}
-int crypto_dh_key_len(const struct dh *p)
+unsigned int crypto_dh_key_len(const struct dh *p)
{
return DH_KPP_SECRET_MIN_SIZE + dh_data_size(p);
}