g10: Avoid caching passphrase for failed symmetric encryption.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Fri, 21 Jul 2017 18:01:10 +0000 (20:01 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Fri, 21 Jul 2017 18:03:59 +0000 (20:03 +0200)
commite4c720fa3b31ebd3e9d764c6eab02729cf06124c
treeddcf98c6576b3bed0c668d511c31c1133c89e29e
parentb55b72bb815ad5870456b89c3a011fa00991b4a8
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
g10/mainproc.c