size += strlen(buffer);
/* Make sure the buffer is big enough. */
if (sizeof(stored_cert) <= size) {
- LOG(LOG_WARNING, "verify_tls_connection(): '%s' too big",
- path);
+ LOG(LOG_WARNING, "verify_tls_connection(): '%s' too big", path);
fclose(file);
return -1;
}
return 0;
}
-int server_certificate_path(FILE **file, const char *hostname, char *path, size_t size) {
+int server_certificate_path(FILE **file, const char *hostname,
+ char *path, size_t size) {
/* Hostname too long. */
if (size - strlen(STORED_SERVER_CERT_FORMAT) <= strlen(hostname)) {
LOG(LOG_WARNING,
#ifndef VERIFY_H
#define VERIFY_H
-int server_certificate_path(FILE **file, const char *hostname, char *path, size_t size);
+int server_certificate_path(FILE **file, const char *hostname,
+ char *path, size_t size);
int verify_tls_connection(gnutls_session_t session, const char *hostname);
#endif