core: Return CANCELED and BAD_PASSPHRASE error code on decryption.
authorWerner Koch <wk@gnupg.org>
Wed, 12 Jul 2017 15:55:43 +0000 (17:55 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 12 Jul 2017 15:55:43 +0000 (17:55 +0200)
commitd37bc7e025cdc6228da45b2b527e9f3bfef71c71
tree33b93323eb179343221aeb3ec522392fe22a0802
parent87703dbb86ac8fd8abd23170f8038ea6e3dbde28
core: Return CANCELED and BAD_PASSPHRASE error code on decryption.

* src/decrypt.c (op_data_t): Add field pkdecrypt_failed.
(_gpgme_decrypt_status_handler): Consult new field.
(parse_status_error): Handle some error codes.
--

The idea is to return only a limited set of error codes because a user
won't be able to understand the more esoteric codes.

GnuPG-bug-id: 3270
Signed-off-by: Werner Koch <wk@gnupg.org>
src/decrypt.c