summaryrefslogtreecommitdiffstats
path: root/crypto/cmac
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cmac')
-rw-r--r--crypto/cmac/cmac.c2
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;
}