diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2021-11-14 16:39:42 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-11-16 17:28:23 +0100 |
commit | 6d774732517f1d63b7999c5691fc0bf046023faf (patch) | |
tree | f9a981ded49d1b494d741d3940fb667c2b274882 /crypto/cmac/cmac.c | |
parent | 35530b117fcf54cf733c485e9e2e267963c081ee (diff) |
EVP_Cipher: fix the incomplete return check
Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17027)
Diffstat (limited to 'crypto/cmac/cmac.c')
-rw-r--r-- | crypto/cmac/cmac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index 18c7fea3dd..218eb94259 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -227,7 +227,7 @@ int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen) for (i = 0; i < bl; i++) out[i] = ctx->last_block[i] ^ ctx->k2[i]; } - if (!EVP_Cipher(ctx->cctx, out, out, bl)) { + if (EVP_Cipher(ctx->cctx, out, out, bl) <= 0) { OPENSSL_cleanse(out, bl); return 0; } |