modes/ocb128.c: Reset nonce-dependent variables on setiv
authorMingtao Yang <mingtao@fb.com>
Wed, 6 Jun 2018 16:34:18 +0000 (09:34 -0700)
committerAndy Polyakov <appro@openssl.org>
Fri, 8 Jun 2018 13:57:33 +0000 (15:57 +0200)
commit776ad43f9d5c50bd8f9d03c89b862d275835247a
tree8b7990934a91446b35c94fd27b3b0abda4564b55
parent6849421c7553337df64536893690478f99f053c9
modes/ocb128.c: Reset nonce-dependent variables on setiv

Upon a call to CRYPTO_ocb128_setiv, either directly on an OCB_CTX or
indirectly with EVP_CTRL_AEAD_SET_IVLEN, reset the nonce-dependent
variables in the OCB_CTX.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/6420)

(cherry picked from commit bbb02a5b6d27f76931c3385321b2c594781c7a1b)
crypto/modes/modes_lcl.h
crypto/modes/ocb128.c