Home GnuPG
Diffusion GPGME e21c3b559dfb

core: Return BAD_PASSPHRASE error code on symmetric decryption.

Description

core: Return BAD_PASSPHRASE error code on symmetric decryption.

* src/decrypt.c (op_data_t): Add field symdecrypt_failed.
(parse_status_error): Handle BAD_PASSPHRASE error code.
(_gpgme_decrypt_status_handler): Consult new field.

Return a bad passphrase error if the failure during symmetric decryption
is likely caused by the user entering a wrong passphrase. The special
error code of a failed public key decryption takes precedence.