diff options
author | Tudor-Dan Ambarus <tudor.ambarus@microchip.com> | 2017-09-29 05:21:05 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-10-12 10:55:05 -0400 |
commit | 5b3f3a8bede7d3af2dc9ea20b0ad971d4e5e83cc (patch) | |
tree | 382538ba9f49bbb3bdbcfb6c3b2745881865ab56 | |
parent | cb195b362537ca97ceccefbbba6b4071ed77434f (diff) |
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>
-rw-r--r-- | crypto/dh_helper.c | 2 | ||||
-rw-r--r-- | include/crypto/dh.h | 2 |
2 files changed, 2 insertions, 2 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) | |||
33 | return p->key_size + p->p_size + p->g_size; | 33 | return p->key_size + p->p_size + p->g_size; |
34 | } | 34 | } |
35 | 35 | ||
36 | int crypto_dh_key_len(const struct dh *p) | 36 | unsigned int crypto_dh_key_len(const struct dh *p) |
37 | { | 37 | { |
38 | return DH_KPP_SECRET_MIN_SIZE + dh_data_size(p); | 38 | return DH_KPP_SECRET_MIN_SIZE + dh_data_size(p); |
39 | } | 39 | } |
diff --git a/include/crypto/dh.h b/include/crypto/dh.h index f638998fb6d0..71e1bb24d79f 100644 --- a/include/crypto/dh.h +++ b/include/crypto/dh.h | |||
@@ -53,7 +53,7 @@ struct dh { | |||
53 | * | 53 | * |
54 | * Return: size of the key in bytes | 54 | * Return: size of the key in bytes |
55 | */ | 55 | */ |
56 | int crypto_dh_key_len(const struct dh *params); | 56 | unsigned int crypto_dh_key_len(const struct dh *params); |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * crypto_dh_encode_key() - encode the private key | 59 | * crypto_dh_encode_key() - encode the private key |