/* 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;
}