2009-04-14 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Tue, 14 Apr 2009 20:36:14 +0000 (20:36 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Tue, 14 Apr 2009 20:36:14 +0000 (20:36 +0000)
* call-pinentry.c (agent_get_confirmation): Try SETNOTOK command
with pinentry.

agent/ChangeLog
agent/call-pinentry.c

index e691ad7..7c948e4 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-14  Marcus Brinkmann  <marcus@g10code.de>
+
+       * call-pinentry.c (agent_get_confirmation): Try SETNOTOK command
+       with pinentry.
+
 2009-04-01  Werner Koch  <wk@g10code.com>
 
        * protect-tool.c (pe_opt): New.
index c840bb6..38561e3 100644 (file)
@@ -870,9 +870,15 @@ agent_get_confirmation (ctrl_t ctrl,
     }
   if (cancel)
     {
-      snprintf (line, DIM(line)-1, "SETCANCEL %s", cancel);
+      snprintf (line, DIM(line)-1, "SETNOTOK %s", cancel);
       line[DIM(line)-1] = 0;
       rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
+      if (gpg_err_code (rc) == GPG_ERR_ASS_UNKNOWN_CMD)
+       {
+         snprintf (line, DIM(line)-1, "SETCANCEL %s", cancel);
+         line[DIM(line)-1] = 0;
+         rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
+       }
       if (rc)
         return unlock_pinentry (rc);
     }