diff options
| author | Werner Koch <[email protected]> | 2018-01-10 16:07:11 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2018-01-10 16:07:11 +0000 |
| commit | 4e2ba546cdccbbc6d3e29867ee5671fd44d74e67 (patch) | |
| tree | ed822c35d3c88ba22a4754e2765a02a928e1a6ef /g10/main.h | |
| parent | gpg: Add option and preference framework for AEAD. (diff) | |
| download | gnupg-4e2ba546cdccbbc6d3e29867ee5671fd44d74e67.tar.gz gnupg-4e2ba546cdccbbc6d3e29867ee5671fd44d74e67.zip | |
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 <[email protected]>
Diffstat (limited to 'g10/main.h')
| -rw-r--r-- | g10/main.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/g10/main.h b/g10/main.h index 6abc5985f..393a1b09e 100644 --- a/g10/main.h +++ b/g10/main.h @@ -233,6 +233,7 @@ void display_online_help( const char *keyword ); /*-- encode.c --*/ int setup_symkey (STRING2KEY **symkey_s2k,DEK **symkey_dek); void encrypt_seskey (DEK *dek, DEK **seskey, byte *enckey); +int use_aead (pk_list_t pk_list, int algo); int use_mdc (pk_list_t pk_list,int algo); int encrypt_symmetric (const char *filename ); int encrypt_store (const char *filename ); |
