Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181020
b: refs/heads/master
c: f3542e6
h: refs/heads/master
v: v3
  • Loading branch information
Richard Hartmann authored and Herbert Xu committed Feb 16, 2010
1 parent 9fa36ca commit c8916c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d01a33b77b120f8b11d8757c346442ed7961b11
refs/heads/master: f3542e6d7b246e88b038e608358606ddd1f09870
10 changes: 5 additions & 5 deletions trunk/crypto/authenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static void authenc_verify_ahash_update_done(struct crypto_async_request *areq,
scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen,
authsize, 0);

err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG: 0;
err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG : 0;
if (err)
goto out;

Expand Down Expand Up @@ -231,7 +231,7 @@ static void authenc_verify_ahash_done(struct crypto_async_request *areq,
scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen,
authsize, 0);

err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG: 0;
err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG : 0;
if (err)
goto out;

Expand Down Expand Up @@ -464,7 +464,7 @@ static int crypto_authenc_verify(struct aead_request *req,
ihash = ohash + authsize;
scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen,
authsize, 0);
return memcmp(ihash, ohash, authsize) ? -EBADMSG: 0;
return memcmp(ihash, ohash, authsize) ? -EBADMSG : 0;
}

static int crypto_authenc_iverify(struct aead_request *req, u8 *iv,
Expand Down Expand Up @@ -557,11 +557,11 @@ static int crypto_authenc_init_tfm(struct crypto_tfm *tfm)

ctx->auth = auth;
ctx->enc = enc;

tfm->crt_aead.reqsize = max_t(unsigned int,
crypto_ahash_reqsize(auth) + ctx->reqoff +
sizeof(struct authenc_request_ctx) +
sizeof(struct ahash_request),
sizeof(struct ahash_request),
sizeof(struct skcipher_givcrypt_request) +
crypto_ablkcipher_reqsize(enc) +
crypto_ablkcipher_ivsize(enc));
Expand Down

0 comments on commit c8916c7

Please sign in to comment.