]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/verify.c
Sort #includes and remove unnecessary comments.
[tlsproxy/tlsproxy.git] / src / verify.c
index 96c49a51b7f23ff0502dbfeeec3d1163052943ed..487ad2ede213e1fc266d4e890fc5ce5ee50f1980 100644 (file)
@@ -20,9 +20,8 @@
 #include "tlsproxy.h"
 #include "verify.h"
 
-/* errno */
 #include <errno.h>
-/* gnutls_x509_*() */
+
 #include <gnutls/x509.h>
 
 
@@ -148,7 +147,7 @@ int verify_tls_connection(gnutls_session_t session, const char *hostname) {
     fclose(file);
 
     /* Check if the server certificate matches our stored certificate. */
-    if (strcmp(stored_cert, server_cert) != 0) {
+    if (strcmp(stored_cert, server_cert)) {
         LOG(LOG_ERROR,
             "verify_tls_connection(): server certificate changed!",
             path, strerror(errno));