diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-11 05:47:55 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-12 22:31:38 -0400 |
commit | 6650d09b3a0fea2c1f03f28f7a49309050529718 (patch) | |
tree | 7c9f91561f29a23898ae54a73401175bc094d201 /crypto/authencesn.c | |
parent | 25df91943018ca173fcd77998096b3621e987499 (diff) |
crypto: authencesn - Use crypto_aead_set_reqsize helper
This patch uses the crypto_aead_set_reqsize helper to avoid directly
touching the internals of aead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/authencesn.c')
-rw-r--r-- | crypto/authencesn.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/authencesn.c b/crypto/authencesn.c index 91e2cc31086a..a3da6770bc9e 100644 --- a/crypto/authencesn.c +++ b/crypto/authencesn.c | |||
@@ -662,13 +662,14 @@ static int crypto_authenc_esn_init_tfm(struct crypto_tfm *tfm) | |||
662 | crypto_ahash_alignmask(auth) + 1) + | 662 | crypto_ahash_alignmask(auth) + 1) + |
663 | crypto_ablkcipher_ivsize(enc); | 663 | crypto_ablkcipher_ivsize(enc); |
664 | 664 | ||
665 | tfm->crt_aead.reqsize = sizeof(struct authenc_esn_request_ctx) + | 665 | crypto_aead_set_reqsize(__crypto_aead_cast(tfm), |
666 | ctx->reqoff + | 666 | sizeof(struct authenc_esn_request_ctx) + |
667 | max_t(unsigned int, | 667 | ctx->reqoff + |
668 | crypto_ahash_reqsize(auth) + | 668 | max_t(unsigned int, |
669 | sizeof(struct ahash_request), | 669 | crypto_ahash_reqsize(auth) + |
670 | sizeof(struct skcipher_givcrypt_request) + | 670 | sizeof(struct ahash_request), |
671 | crypto_ablkcipher_reqsize(enc)); | 671 | sizeof(struct skcipher_givcrypt_request) + |
672 | crypto_ablkcipher_reqsize(enc))); | ||
672 | 673 | ||
673 | return 0; | 674 | return 0; |
674 | 675 | ||