/* Open stored server certificate file. */
if (0 != server_certificate_path(&file, hostname, path, sizeof(path))) {
+ LOG(LOG_DEBUG, "server certificate:\n%s", server_cert);
return -1;
}
if (sizeof(stored_cert) <= size) {
LOG(LOG_WARNING, "verify_tls_connection(): '%s' too big", path);
fclose(file);
+
+ LOG(LOG_DEBUG, "server certificate:\n%s", server_cert);
return -1;
}
LOG(LOG_WARNING,
"verify_tls_connection(): failed to read from '%s': %s",
path, strerror(errno));
+
+ LOG(LOG_DEBUG, "server certificate:\n%s", server_cert);
return -1;
}
fclose(file);
LOG(LOG_ERROR,
"verify_tls_connection(): server certificate changed!",
path, strerror(errno));
+
+ LOG(LOG_WARNING, "server certificate:\n%s", server_cert);
return -2;
}