gpg: New option --force-aead
authorWerner Koch <wk@gnupg.org>
Wed, 10 Jan 2018 16:07:11 +0000 (17:07 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 10 Jan 2018 16:07:11 +0000 (17:07 +0100)
commit4e2ba546cdccbbc6d3e29867ee5671fd44d74e67
treeed822c35d3c88ba22a4754e2765a02a928e1a6ef
parent8217cd49364b9f81b390f7ca6a608dd946f93efc
gpg: New option --force-aead

* g10/dek.h (DEK): Turn fields use_mdc, algo_printed and symmetric
into single bit vars.  Make sure they are always set to 1 or 0.
(DEK): New field use_aead.
* g10/options.h (struct opt): New field force_aead.
* g10/pkclist.c (select_aead_from_pklist): New.
* g10/gpg.c (oForceAEAD): New const.
(opts): New options "--force-aead".
(main): Set new option.
* g10/encrypt.c (use_aead): New.
(encrypt_simple): Implement new flags DEK.use_aead.
(encrypt_crypt): Ditto.
(encrypt_filter): Ditto.
* g10/sign.c (sign_symencrypt_file): Ditto.
--

This patch should be enough to detect whether AEAD can be used.
Not tested.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/dek.h
g10/encrypt.c
g10/gpg.c
g10/keydb.h
g10/main.h
g10/options.h
g10/pkclist.c
g10/sign.c