* certpath.c (check_cert_policy): Don't use log_error to print a
authorWerner Koch <wk@gnupg.org>
Tue, 2 Jul 2002 17:40:26 +0000 (17:40 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 2 Jul 2002 17:40:26 +0000 (17:40 +0000)
warning.

sm/ChangeLog
sm/certchain.c
sm/certpath.c

index e44044b..ac45cfa 100644 (file)
@@ -1,5 +1,8 @@
 2002-07-02  Werner Koch  <wk@gnupg.org>
 
+       * certpath.c (check_cert_policy): Don't use log_error to print a
+       warning.
+
        * keydb.c (keydb_store_cert): Add optional ar EXISTED and changed
        all callers.
        * call-agent.c (learn_cb): Print info message only for real imports.
index 719f97b..39fd0ad 100644 (file)
@@ -145,9 +145,14 @@ check_cert_policy (KsbaCert cert)
               if (feof (fp))
                 {
                   fclose (fp);
-                  log_error (_("certificate policy not allowed\n"));
                   /* with no critical policies this is only a warning */
-                  return any_critical? GNUPG_No_Policy_Match : 0;
+                  if (!any_critical)
+                    {
+                      log_info (_("note: certificate policy not allowed\n"));
+                      return 0;
+                    }
+                  log_error (_("certificate policy not allowed\n"));
+                  return GNUPG_No_Policy_Match;
                 }
               fclose (fp);
               return GNUPG_Read_Error;
index 719f97b..39fd0ad 100644 (file)
@@ -145,9 +145,14 @@ check_cert_policy (KsbaCert cert)
               if (feof (fp))
                 {
                   fclose (fp);
-                  log_error (_("certificate policy not allowed\n"));
                   /* with no critical policies this is only a warning */
-                  return any_critical? GNUPG_No_Policy_Match : 0;
+                  if (!any_critical)
+                    {
+                      log_info (_("note: certificate policy not allowed\n"));
+                      return 0;
+                    }
+                  log_error (_("certificate policy not allowed\n"));
+                  return GNUPG_No_Policy_Match;
                 }
               fclose (fp);
               return GNUPG_Read_Error;