summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-04-18 22:48:40 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-04-18 22:48:40 +0000
commitb5dd1787401256f6a4d70686debf13b096f2bc22 (patch)
treeafed0542636a857f2edcb3cfd4c2e969d2dc3596 /crypto/evp
parent98279c162963808e051cfced2ca888156e9b6124 (diff)
Fix EVP CCM decrypt. Add decrypt support to algorithm test program.
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/e_aes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index 2d33837478..e862096369 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -625,7 +625,7 @@ static int aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
case EVP_CTRL_CCM_GET_TAG:
if (!c->encrypt || !cctx->tag_set)
return 0;
- if(CRYPTO_ccm128_tag(&cctx->ccm, ptr, (size_t)arg))
+ if(!CRYPTO_ccm128_tag(&cctx->ccm, ptr, (size_t)arg))
return 0;
cctx->tag_set = 0;
cctx->iv_set = 0;
@@ -707,7 +707,7 @@ static int aes_ccm(EVP_CIPHER_CTX *ctx, unsigned char *out,
if (!CRYPTO_ccm128_decrypt(ccm, in, out, len))
{
unsigned char tag[16];
- if (!CRYPTO_ccm128_tag(ccm, tag, cctx->M))
+ if (CRYPTO_ccm128_tag(ccm, tag, cctx->M))
{
if (!memcmp(tag, ctx->buf, cctx->M))
rv = len;