Skip to content

Commit

Permalink
crypto: dh - comply with crypto_kpp_maxsize()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
ambarus authored and herbertx committed Jun 10, 2017
1 parent c444b8d commit 7f69105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static int dh_compute_value(struct kpp_request *req)
return ret;
}

static int dh_max_size(struct crypto_kpp *tfm)
static unsigned int dh_max_size(struct crypto_kpp *tfm)
{
struct dh_ctx *ctx = dh_get_ctx(tfm);

Expand Down

0 comments on commit 7f69105

Please sign in to comment.