* gpgme.h: Add GPGME_STATUS_NEED_PASSPHRASE_PIN.
authorWerner Koch <wk@gnupg.org>
Thu, 2 Jun 2005 11:28:11 +0000 (11:28 +0000)
committerWerner Koch <wk@gnupg.org>
Thu, 2 Jun 2005 11:28:11 +0000 (11:28 +0000)
* 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".

gpgme/ChangeLog
gpgme/gpgme.h
gpgme/passphrase.c

index 19d23a9be840cb58aff8b536c73727ed8fb41cde..8a348c4605d5e371eff3342c5c62036ca7c00e8e 100644 (file)
@@ -1,3 +1,11 @@
+2005-06-02  Werner Koch  <wk@g10code.com>
+
+       * 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  <marcus@g10code.de>
 
        * data-user.c: Include <errno.h>.
index b7ccedce4e7825c1966743d7165fd1f03ae63089..bdd6137ebb3d756d13c44591b522ba3f5ddf4983 100644 (file)
@@ -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;
 
index 921b69c068e11d47b341160d02a669cae974d5e4..16cee5c49739d1bc6cb2d42de70a7c40ced44244 100644 (file)
@@ -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;