Home GnuPG
Diffusion GnuPG 0f8623d518d4

gpg: Emit an ERROR status as hint for a bad passphrase.

Description

gpg: Emit an ERROR status as hint for a bad passphrase.

* g10/mainproc.c (proc_symkey_enc): Issue new error code.
(proc_encrypted): Ditto.

This allows GPGME to return a better error message than "bad session
key" to the user. Technically we could get run into these errors also
in other cases but this more unlikley. For the command line use we
don't do anything to not change the expected output of the command
line interface.