crypto: ecdh_helper - return unsigned value for crypto_ecdh_key_len()
PATCH 1/1 crypto: ecdh_helper - return unsigned value for crypto_ecdh_key_len()
ECDH_KPP_SECRET_MIN_SIZE and params->key_size are both returning unsigned values.
Signed-off-by Tudor Ambarus <[email protected]>
--- crypto/ecdh_helper.c | 2 +- include/crypto/ecdh.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
crypto/ecdh_helper.c +1 -1
@@ -28,7 +28,7 @@ static inline const u8 *ecdh_unpack_data(void *dst, const void *src, size_t sz)return src + sz; } -int crypto_ecdh_key_len (const struct ecdh *params) +unsigned int crypto_ecdh_key_len (const struct ecdh *params) {return ECDH_KPP_SECRET_MIN_SIZE + params->key_size; }
include/crypto/ecdh.h +1 -1
@@ -54,7 +54,7 @@ struct ecdh {* * Return: size of the key in bytes */ -int crypto_ecdh_key_len (const struct ecdh *params); +unsigned int crypto_ecdh_key_len (const struct ecdh *params);/** * crypto_ecdh_encode_key() - encode the private key
Signature · 1 line
2.9.4
Herbert Xu
maintainerQuoted 4 lines · Tudor Ambarus
ECDH_KPP_SECRET_MIN_SIZEandparams->key_sizeare both returning unsigned values.Signed-off-by Tudor Ambarus <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt