Commit 6e97e08d authored by Tudor-Dan Ambarus's avatar Tudor-Dan Ambarus Committed by Herbert Xu

crypto: ecdh - 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: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 924c9e36
...@@ -28,7 +28,7 @@ static inline const u8 *ecdh_unpack_data(void *dst, const void *src, size_t sz) ...@@ -28,7 +28,7 @@ static inline const u8 *ecdh_unpack_data(void *dst, const void *src, size_t sz)
return src + 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; return ECDH_KPP_SECRET_MIN_SIZE + params->key_size;
} }
......
...@@ -54,7 +54,7 @@ struct ecdh { ...@@ -54,7 +54,7 @@ struct ecdh {
* *
* Return: size of the key in bytes * 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 * crypto_ecdh_encode_key() - encode the private key
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment