diff --git a/src/gpgme.h.in b/src/gpgme.h.in index ec2b3b0d..1defa4df 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -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; diff --git a/src/passphrase.c b/src/passphrase.c index 2a7daea1..140cd03a 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -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); diff --git a/src/status-table.c b/src/status-table.c index eeafb896..6ec73ab1 100644 --- a/src/status-table.c +++ b/src/status-table.c @@ -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 },