Home GnuPG
Diffusion GnuPG 6cc4119ec03b

gpg: Return the last error for pubkey decryption.

Description

gpg: Return the last error for pubkey decryption.

* g10/mainproc.c (proc_encrypted): Check ->result against -1.
When c->dek == NULL, put GPG_ERR_NO_SECKEY only when not set.
* g10/pubkey-enc.c (get_session_key): Set k->result by the result of
get_it.
When no secret key is available for some reasons, return the last
specific error, if any.
  • GnuPG-bug-id: T4561
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details