Skip to content

Commit 7f69105

Browse files
ambarusherbertx
authored andcommitted
crypto: dh - comply with crypto_kpp_maxsize()
crypto_kpp_maxsize() asks for the output buffer size without caring for errors. It allways assume that will be called after a valid setkey. Comply with it and return what he wants. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent c444b8d commit 7f69105

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎crypto/dh.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int dh_compute_value(struct kpp_request *req)
147147
return ret;
148148
}
149149

150-
static int dh_max_size(struct crypto_kpp *tfm)
150+
static unsigned int dh_max_size(struct crypto_kpp *tfm)
151151
{
152152
struct dh_ctx *ctx = dh_get_ctx(tfm);
153153

0 commit comments

Comments
 (0)