crypto: ecdh - return unsigned value for crypto_ecdh_key_len()
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Fri, 29 Sep 2017 09:13:08 +0000 (12:13 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Oct 2017 14:55:00 +0000 (22:55 +0800)
ECDH_KPP_SECRET_MIN_SIZE and params->key_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>
crypto/ecdh_helper.c
include/crypto/ecdh.h

index f05bea5fd257ad85f0a9e771d62441ce8d03a4c1..d3af8e8b0b5e41dda8dd85d047e2113d3ca4e9e6 100644 (file)
@@ -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;
 }
index 1aff2a8a3a68927f82c6921da5bbff08dfa65237..d696317c43a8c43548884412e05d76d5782efb69 100644 (file)
@@ -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