diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-27 14:00:50 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-28 10:38:38 +0000 |
commit | d57d135c33938dfdac441c98b2c40183a8cb66b0 (patch) | |
tree | c67c5400cf24eaa05c8526147e89e8a7201b6b2f /crypto/evp/e_aes.c | |
parent | 646e8c1d6b30a2ed080ce5b968b49d234b42644f (diff) |
Replace EVP_CTRL_OCB_SET_TAGLEN with EVP_CTRL_SET_TAG for consistency with
CCM
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/evp/e_aes.c')
-rw-r--r-- | crypto/evp/e_aes.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 8b31388690..435d9ea772 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -2225,15 +2225,15 @@ static int aes_ocb_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) octx->ivlen = arg; return 1; - case EVP_CTRL_OCB_SET_TAGLEN: - /* Tag len must be 0 to 16 */ - if (arg < 0 || arg > 16) - return 0; - - octx->taglen = arg; - return 1; - case EVP_CTRL_SET_TAG: + if (!ptr) { + /* Tag len must be 0 to 16 */ + if (arg < 0 || arg > 16) + return 0; + + octx->taglen = arg; + return 1; + } if (arg != octx->taglen || c->encrypt) return 0; memcpy(octx->tag, ptr, arg); |