* passphrase.c (_gpgme_passphrase_status_handler): Take care of
authorWerner Koch <wk@gnupg.org>
Thu, 2 Jun 2005 11:22:14 +0000 (11:22 +0000)
committerWerner Koch <wk@gnupg.org>
Thu, 2 Jun 2005 11:22:14 +0000 (11:22 +0000)
GPGME_STATUS_NEED_PASSPHRASE_PIN.
(_gpgme_passphrase_command_handler_internal): Also act on the key
"passphrase.pin.ask".

* gpgme.h: Added status codes GPGME_STATUS_SIG_SUBPACKET,
GPGME_STATUS_NEED_PASSPHRASE_PIN, GPGME_STATUS_SC_OP_FAILURE,
GPGME_STATUS_SC_OP_SUCCESS, GPGME_STATUS_CARDCTRL,
GPGME_STATUS_BACKUP_KEY_CREATED.

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

index d99166fced0906c6186cdf38272c024ef7f411fb..0a2509dcba7f6c428bf7f394ef6ceff3f5fecb2f 100644 (file)
@@ -1,3 +1,15 @@
+2005-06-02  Werner Koch  <wk@g10code.com>
+
+       * 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.h: Added status codes GPGME_STATUS_SIG_SUBPACKET,
+       GPGME_STATUS_NEED_PASSPHRASE_PIN, GPGME_STATUS_SC_OP_FAILURE,
+       GPGME_STATUS_SC_OP_SUCCESS, GPGME_STATUS_CARDCTRL,
+       GPGME_STATUS_BACKUP_KEY_CREATED.
+
 2005-05-28  Marcus Brinkmann  <marcus@g10code.de>
 
        * data-user.c: Include <errno.h>.
index c3f5123b8cfc4e594fbbfdb75a3963ec9385b36f..0708d378f79d48776afeb3d726f324b9796b12d2 100644 (file)
@@ -397,7 +397,13 @@ typedef enum
     GPGME_STATUS_TRUNCATED,
     GPGME_STATUS_ERROR,
     GPGME_STATUS_NEWSIG,
-    GPGME_STATUS_REVKEYSIG
+    GPGME_STATUS_REVKEYSIG,
+    GPGME_STATUS_SIG_SUBPACKET,
+    GPGME_STATUS_NEED_PASSPHRASE_PIN,
+    GPGME_STATUS_SC_OP_FAILURE,
+    GPGME_STATUS_SC_OP_SUCCESS,
+    GPGME_STATUS_CARDCTRL,
+    GPGME_STATUS_BACKUP_KEY_CREATED
   }
 gpgme_status_code_t;
 
index 921b69c068e11d47b341160d02a669cae974d5e4..74214fb1156c034084eaac39a665d5c891cfee53 100644 (file)
@@ -1,6 +1,6 @@
 /* passphrase.c - Passphrase callback.
    Copyright (C) 2000 Werner Koch (dd9jn)
-   Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH
+   Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH
  
    This file is part of GPGME.
  
@@ -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;