gpg: Unify AEAD parameter retrieval.
authorWerner Koch <wk@gnupg.org>
Mon, 22 Jan 2018 15:23:02 +0000 (16:23 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 22 Jan 2018 15:50:21 +0000 (16:50 +0100)
commitda3015e3c05030fe709c8f922486e73d06d1d16a
treeda4271c073ce4051ee7ae7a1b07af89d0d354425
parent0131d4369a81a51bf7bb328cc81a3bb082ed1a94
gpg: Unify AEAD parameter retrieval.

* g10/pkclist.c (select_aead_from_pklist): Return the AEAD_algo.
* g10/encrypt.c (use_aead): Return the AEAD algo.
(encrypt_simple): Adjust for this change.
(encrypt_crypt): Ditto.
(encrypt_filter): Ditto.
* g10/sign.c (sign_symencrypt_file): Ditto.

* g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New.
(openpgp_aead_algo_info): New.
* g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
(write_header): Use new fucntion.
* g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
(decrypt_data): Use new function.  Also allow for chunkbytes other
than 10.
--

Note that other chunk bytes than 10 and in particular 0 (64 byte
chunks) have not yet been tested.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/cipher-aead.c
g10/decrypt-data.c
g10/encrypt.c
g10/keydb.h
g10/main.h
g10/misc.c
g10/pkclist.c
g10/sign.c