diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-06-09 23:17:06 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-07-06 18:35:35 +0100 |
commit | c0b674b7cbd9146982850523293c74b9131b26d5 (patch) | |
tree | a36f1848a0ac66dbd87e8ccb54643e2105ada7bd /crypto/evp | |
parent | a229c2b805bb8c8081fe6d9cb5d9fc2fb9888c19 (diff) |
Relax CCM tag check.
In CCM mode don't require a tag before initialising decrypt: this allows
the tag length to be set without requiring the tag.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 9cca7be11d62298b2af0722f94345012c86eaed4)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/e_aes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 33cbed87f4..1734a823c1 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -1771,7 +1771,7 @@ static int aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) case EVP_CTRL_CCM_SET_TAG: if ((arg & 1) || arg < 4 || arg > 16) return 0; - if ((c->encrypt && ptr) || (!c->encrypt && !ptr)) + if (c->encrypt && ptr) return 0; if (ptr) { cctx->tag_set = 1; |