X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=src%2Fverify.c;h=14c7127b7c39cd01ad0b9aa0082cb1396b35f6ca;hb=28f6cc33be1ae9af34dcedc1f019f91f405de3ec;hp=6558d42866422a9a85b8f6ce4ae0fb526a20bc35;hpb=80e82203daef6daf7a16219876fc404e12f82c8a;p=tlsproxy%2Ftlsproxy.git diff --git a/src/verify.c b/src/verify.c index 6558d42..14c7127 100644 --- a/src/verify.c +++ b/src/verify.c @@ -106,7 +106,7 @@ int verify_tls_connection(gnutls_session_t session, const char *hostname) { gnutls_x509_crt_deinit(cert); return -1; } - /* We got the certificate as PEM, free it. */ + /* We got the certificate as PEM, free the crt struct. */ gnutls_x509_crt_deinit(cert); /* Open stored server certificate file. */ @@ -121,8 +121,7 @@ int verify_tls_connection(gnutls_session_t session, const char *hostname) { 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; } @@ -149,7 +148,8 @@ int verify_tls_connection(gnutls_session_t session, const char *hostname) { 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,