* server.c (cmd_recipient): Add more reason codes.
authorWerner Koch <wk@gnupg.org>
Fri, 28 Jun 2002 14:04:46 +0000 (14:04 +0000)
committerWerner Koch <wk@gnupg.org>
Fri, 28 Jun 2002 14:04:46 +0000 (14:04 +0000)
sm/ChangeLog
sm/certchain.c
sm/certpath.c
sm/server.c

index bcc6136..160fe47 100644 (file)
@@ -1,5 +1,12 @@
+2002-06-28  Werner Koch  <wk@gnupg.org>
+
+       * server.c (cmd_recipient): Add more reason codes.
+
 2002-06-27  Werner Koch  <wk@gnupg.org>
 
+       * certpath.c (gpgsm_basic_cert_check): Use
+       --debug-no-path-validation to also bypass this basic check.
+
        * gpgsm.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
 
        * call-agent.c (start_agent): Create and pass the list of FD to
index 5cae1ea..a32c2d7 100644 (file)
@@ -612,7 +612,7 @@ gpgsm_basic_cert_check (KsbaCert cert)
   KEYDB_HANDLE kh = keydb_new (0);
   KsbaCert issuer_cert = NULL;
 
-  if ((opt.debug & 4096))
+  if (opt.no_path_validation)
     {
       log_info ("WARNING: bypassing basic certificate checks\n");
       return 0;
index 5cae1ea..a32c2d7 100644 (file)
@@ -612,7 +612,7 @@ gpgsm_basic_cert_check (KsbaCert cert)
   KEYDB_HANDLE kh = keydb_new (0);
   KsbaCert issuer_cert = NULL;
 
-  if ((opt.debug & 4096))
+  if (opt.no_path_validation)
     {
       log_info ("WARNING: bypassing basic certificate checks\n");
       return 0;
index 47d870d..4a8a8c4 100644 (file)
@@ -243,7 +243,14 @@ cmd_recipient (ASSUAN_CONTEXT ctx, char *line)
   if (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 ",
                    line, NULL);
 
   return map_to_assuan_status (rc);