Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b3f3a8b authored by Tudor-Dan Ambarus's avatar Tudor-Dan Ambarus Committed by Herbert Xu
Browse files

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: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent cb195b36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static inline unsigned int dh_data_size(const struct dh *p)
	return p->key_size + p->p_size + p->g_size;
}

int crypto_dh_key_len(const struct dh *p)
unsigned int crypto_dh_key_len(const struct dh *p)
{
	return DH_KPP_SECRET_MIN_SIZE + dh_data_size(p);
}
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ struct dh {
 *
 * Return: size of the key in bytes
 */
int crypto_dh_key_len(const struct dh *params);
unsigned int crypto_dh_key_len(const struct dh *params);

/**
 * crypto_dh_encode_key() - encode the private key