aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-01-22 15:23:02 +0000
committerWerner Koch <[email protected]>2018-01-22 15:50:21 +0000
commitda3015e3c05030fe709c8f922486e73d06d1d16a (patch)
treeda4271c073ce4051ee7ae7a1b07af89d0d354425 /g10/sign.c
parentgpg: Refactor function encrypt_seskey. (diff)
downloadgnupg-da3015e3c05030fe709c8f922486e73d06d1d16a.tar.gz
gnupg-da3015e3c05030fe709c8f922486e73d06d1d16a.zip
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 <[email protected]>
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 051ab594d..7045e8cad 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1337,9 +1337,8 @@ sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr)
goto leave;
}
- if (use_aead (NULL, cfx.dek->algo))
- cfx.dek->use_aead = 1;
- else
+ cfx.dek->use_aead = use_aead (NULL, cfx.dek->algo);
+ if (!cfx.dek->use_aead)
cfx.dek->use_mdc = !!use_mdc (NULL, cfx.dek->algo);
/* now create the outfile */