gpg: Simplify the AEAD decryption function.
authorWerner Koch <wk@gnupg.org>
Tue, 27 Feb 2018 20:11:20 +0000 (21:11 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 27 Feb 2018 20:11:34 +0000 (21:11 +0100)
commit618b86325f776f7250ad2bb09680e4bb427d7e50
treef76c4c3098457b07dd92b9af2167abf1cf7320e8
parentad989373f1a46139ed0fbc4d4a91069b78617ad9
gpg: Simplify the AEAD decryption function.

* g10/decrypt-data.c (aead_set_nonce, aead_set_ad): Merge into ...
(aead_set_nonce_and_ad): new single function.  Change callers.
(decrypt_data): Do not set the nonce and ad here.
(aead_underflow): Get rid of the LAST_CHUNK_DONE hack.
--

The main change here is that we now re-init the context only right
before we decrypt and not after a checktag.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/decrypt-data.c