diff options
author | Werner Koch <[email protected]> | 2005-06-02 11:28:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2005-06-02 11:28:11 +0000 |
commit | 171f8b6b6c635c20873d0c794db24449dfd974d4 (patch) | |
tree | c4ed3d482e4a437ce34199720af6faa312ec6f51 | |
parent | Merging bug-fixes from CVS HEAD. (diff) | |
download | gpgme-171f8b6b6c635c20873d0c794db24449dfd974d4.tar.gz gpgme-171f8b6b6c635c20873d0c794db24449dfd974d4.zip |
* gpgme.h: Add GPGME_STATUS_NEED_PASSPHRASE_PIN.
* passphrase.c (_gpgme_passphrase_status_handler): Take care of
GPGME_STATUS_NEED_PASSPHRASE_PIN.
(_gpgme_passphrase_command_handler_internal): Also act on the key
"passphrase.pin.ask".
-rw-r--r-- | gpgme/ChangeLog | 8 | ||||
-rw-r--r-- | gpgme/gpgme.h | 3 | ||||
-rw-r--r-- | gpgme/passphrase.c | 5 |
3 files changed, 14 insertions, 2 deletions
diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 19d23a9b..8a348c46 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,11 @@ +2005-06-02 Werner Koch <[email protected]> + + * gpgme.h: Add GPGME_STATUS_NEED_PASSPHRASE_PIN. + * passphrase.c (_gpgme_passphrase_status_handler): Take care of + GPGME_STATUS_NEED_PASSPHRASE_PIN. + (_gpgme_passphrase_command_handler_internal): Also act on the key + "passphrase.pin.ask". + 2005-05-28 Marcus Brinkmann <[email protected]> * data-user.c: Include <errno.h>. diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index b7ccedce..bdd6137e 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -399,7 +399,8 @@ typedef enum GPGME_STATUS_TRUNCATED, GPGME_STATUS_ERROR, GPGME_STATUS_NEWSIG, - GPGME_STATUS_REVKEYSIG + GPGME_STATUS_REVKEYSIG, + GPGME_STATUS_NEED_PASSPHRASE_PIN } gpgme_status_code_t; diff --git a/gpgme/passphrase.c b/gpgme/passphrase.c index 921b69c0..16cee5c4 100644 --- a/gpgme/passphrase.c +++ b/gpgme/passphrase.c @@ -90,6 +90,7 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code, case GPGME_STATUS_NEED_PASSPHRASE: case GPGME_STATUS_NEED_PASSPHRASE_SYM: + case GPGME_STATUS_NEED_PASSPHRASE_PIN: if (opd->passphrase_info) free (opd->passphrase_info); opd->passphrase_info = strdup (args); @@ -133,7 +134,9 @@ _gpgme_passphrase_command_handler_internal (void *priv, if (err) return err; - if (code == GPGME_STATUS_GET_HIDDEN && !strcmp (key, "passphrase.enter")) + if (code == GPGME_STATUS_GET_HIDDEN + && (!strcmp (key, "passphrase.enter") + || !strcmp (key, "passphrase.pin.ask"))) { if (processed) *processed = 1; |