]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/verify.c
Implement cleaner logging approach.
[tlsproxy/tlsproxy.git] / src / verify.c
index 8328432b5e27e0174590c0c69cb97e92fc36c608..5248dd6cd243dff33609066f3da00c0c3a6bf5ce 100644 (file)
@@ -176,9 +176,15 @@ int server_certificate_path(FILE **file, const char *hostname,
     /* Open the stored certificate file. */
     *file = fopen(path, "rb");
     if (NULL == *file) {
-        LOG(global_passthrough_unknown ? LOG_DEBUG : LOG_WARNING,
-            "server_certificate_path(): failed to open '%s': %s",
-            path, strerror(errno));
+        if (global_passthrough_unknown) {
+            LOG(LOG_DEBUG,
+                "server_certificate_path(): failed to open '%s': %s",
+                path, strerror(errno));
+        } else {
+            LOG(LOG_WARNING,
+                "server_certificate_path(): failed to open '%s': %s",
+                path, strerror(errno));
+        }
         /* Couldn't open the file, special case. */
         return -2;
     }