[Pkg-gnupg-commit] [gnupg2] 132/185: g10: Avoid caching passphrase for failed symmetric encryption.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Aug 7 11:55:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit e4c720fa3b31ebd3e9d764c6eab02729cf06124c
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date: Fri Jul 21 20:01:10 2017 +0200
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 at g10code.com>
GnuPG-bug-id: 2270
---
g10/mainproc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/g10/mainproc.c b/g10/mainproc.c
index fddafd8..d0584d3 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -681,7 +681,8 @@ proc_encrypted (CTX c, PACKET *pkt)
}
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')
{
if (opt.debug)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list