Skip to contentSkip to conversation

crypto: ecdh_helper - return unsigned value for crypto_ecdh_key_len()

PATCH In review Tudor Ambarus 2 participants 2 messages Sep 29, 2017 – Oct 12, 2017 Crypto API

lore
Share & tools
lore
#0 lore raw

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.

---
 crypto/ecdh_helper.c  | 2 +-
 include/crypto/ecdh.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
crypto/ecdh_helper.c +1 -1
index f05bea5..d3af8e8 100644
@@ -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
index 1aff2a8..d696317 100644
@@ -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
maintainer
#1 lore raw
Quoted 4 lines · Tudor Ambarus

ECDH_KPP_SECRET_MIN_SIZE and params->key_size are both returning unsigned values.

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