mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
g10: Avoid caching passphrase for failed symmetric encryption.
* g10/mainproc.c (proc_encrypted): If error code is GPG_ERR_CIPHER_ALGO, assume the symmetric passphrase was wrong and invalidate the cache. Signed-off-by: Marcus Brinkmann <mb@g10code.com> GnuPG-bug-id: 2270
This commit is contained in:
parent
b55b72bb81
commit
e4c720fa3b
@ -681,7 +681,8 @@ proc_encrypted (CTX c, PACKET *pkt)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gpg_err_code (result) == GPG_ERR_BAD_KEY
|
if ((gpg_err_code (result) == GPG_ERR_BAD_KEY
|
||||||
|
|| gpg_err_code (result) == GPG_ERR_CIPHER_ALGO)
|
||||||
&& *c->dek->s2k_cacheid != '\0')
|
&& *c->dek->s2k_cacheid != '\0')
|
||||||
{
|
{
|
||||||
if (opt.debug)
|
if (opt.debug)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user