Parse STATUS_CANCELED_BY_USER.
* src/gpgme.h.in (GPGME_STATUS_CANCELED_BY_USER): New. * src/status-table.c (status_table_s): Add "CANCELED_BY_USER". * src/passphrase.c (_gpgme_passphrase_status_handler): Return GPG_ERR_CANCELED during GPGME_STATUS_CANCELED_BY_USER. Signed-off-by: Ben Kibbey <bjk@luxsci.net>
This commit is contained in:
parent
0fee135997
commit
35ca460019
@ -2576,7 +2576,8 @@ typedef enum
|
||||
GPGME_STATUS_TOFU_STATS_LONG = 97,
|
||||
GPGME_STATUS_NOTATION_FLAGS = 98,
|
||||
GPGME_STATUS_DECRYPTION_COMPLIANCE_MODE = 99,
|
||||
GPGME_STATUS_VERIFICATION_COMPLIANCE_MODE = 100
|
||||
GPGME_STATUS_VERIFICATION_COMPLIANCE_MODE = 100,
|
||||
GPGME_STATUS_CANCELED_BY_USER = 101
|
||||
}
|
||||
gpgme_status_code_t;
|
||||
|
||||
|
@ -111,6 +111,9 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code,
|
||||
opd->no_passphrase = 1;
|
||||
break;
|
||||
|
||||
case GPGME_STATUS_CANCELED_BY_USER:
|
||||
return gpg_error (GPG_ERR_CANCELED);
|
||||
|
||||
case GPGME_STATUS_EOF:
|
||||
if (opd->no_passphrase || opd->bad_passphrase)
|
||||
return gpg_error (GPG_ERR_BAD_PASSPHRASE);
|
||||
|
@ -51,6 +51,7 @@ static struct status_table_s status_table[] =
|
||||
{ "BEGIN_ENCRYPTION", GPGME_STATUS_BEGIN_ENCRYPTION },
|
||||
{ "BEGIN_SIGNING", GPGME_STATUS_BEGIN_SIGNING },
|
||||
{ "BEGIN_STREAM", GPGME_STATUS_BEGIN_STREAM },
|
||||
{ "CANCELED_BY_USER", GPGME_STATUS_CANCELED_BY_USER },
|
||||
{ "CARDCTRL", GPGME_STATUS_CARDCTRL },
|
||||
{ "DECRYPTION_FAILED", GPGME_STATUS_DECRYPTION_FAILED },
|
||||
{ "DECRYPTION_INFO", GPGME_STATUS_DECRYPTION_INFO },
|
||||
|
Loading…
Reference in New Issue
Block a user