mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Fix flaw in symmetric algorithm selection in mixed mode.
* g10/encrypt.c (setup_symkey): Use default_cipher_algo function instead of the fallback s2k_cipher_algo. Fix error code. (encrypt_simple): Use setup_symkey. -- Aside of removing code duplication this patch fixes the flaw that the S2K cipher algorithm was used when mixing public key and symmetric encryption or signatures with symmetric encrypion. The default_algorithm function should be used here so that the command line option --cipher-algo and --personal-cipher-preferences have an effect. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
969abcf40c
commit
6864bba78e
3 changed files with 10 additions and 18 deletions
|
@ -268,7 +268,7 @@ passphrase_to_dek (int cipher_algo, STRING2KEY *s2k,
|
|||
*canceled = 0;
|
||||
|
||||
if (opt.no_symkey_cache)
|
||||
nocache = 1; /* Force no symmtric key caching. */
|
||||
nocache = 1; /* Force no symmetric key caching. */
|
||||
|
||||
if ( !s2k )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue