* call-dirmngr.c (gpgsm_dirmngr_isvalid): print status of dirmngr
authorWerner Koch <wk@gnupg.org>
Tue, 2 Jul 2002 09:26:05 +0000 (09:26 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 2 Jul 2002 09:26:05 +0000 (09:26 +0000)
call in very verbose mode.

* gpgsm.c (main): Use the same error codes for STATUS_INV_RECP as
with the server mode.

sm/ChangeLog
sm/call-dirmngr.c
sm/gpgsm.c

index 6a0200b..862b44d 100644 (file)
@@ -1,3 +1,11 @@
+2002-07-02  Werner Koch  <wk@gnupg.org>
+
+       * call-dirmngr.c (gpgsm_dirmngr_isvalid): print status of dirmngr
+       call in very verbose mode.
+
+       * gpgsm.c (main): Use the same error codes for STATUS_INV_RECP as
+       with the server mode.
+
 2002-06-29  Werner Koch  <wk@gnupg.org>
 
        * gpgsm.c: New option --auto-issuer-key-retrieve.
index 30b3476..a1d94e2 100644 (file)
@@ -304,6 +304,13 @@ gpgsm_dirmngr_isvalid (KsbaCert cert)
       return seterr (General_Error);
     }
 
+  if (opt.verbose > 1)
+    {
+      char *fpr = gpgsm_get_fingerprint_string (cert, GCRY_MD_SHA1);
+      log_info ("asking dirmngr about %s\n", fpr);
+      xfree (fpr);
+    }
+
   parm.ctx = dirmngr_ctx;
   parm.cert = cert;
 
@@ -313,6 +320,8 @@ gpgsm_dirmngr_isvalid (KsbaCert cert)
 
   rc = assuan_transact (dirmngr_ctx, line, NULL, NULL,
                         inq_certificate, &parm, NULL, NULL);
+  if (opt.verbose > 1)
+    log_info ("response of dirmngr: %s\n", rc? assuan_strerror (rc): "okay");
   return map_assuan_err (rc);
 }
 
index 7b1b0d7..1bfc1bf 100644 (file)
@@ -1068,7 +1068,14 @@ main ( int argc, char **argv)
                      sl->d, gnupg_strerror (rc));
           gpgsm_status2 (&ctrl, STATUS_INV_RECP,
                          rc == -1? "1":
-                         rc == GNUPG_Ambiguous_Name? "2 ": "0 ",
+                         rc == GNUPG_Ambiguous_Name?      "2 ":
+                         rc == GNUPG_Wrong_Key_Usage?     "3 ":
+                         rc == GNUPG_Certificate_Revoked? "4 ":
+                         rc == GNUPG_Certificate_Expired? "5 ":
+                         rc == GNUPG_No_CRL_Known?        "6 ":
+                         rc == GNUPG_CRL_Too_Old?         "8 ":
+                         rc == GNUPG_No_Policy_Match?     "8 ":
+                         "0 ",
                          sl->d, NULL);
         }
   }