]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
tests/client.c: Exit with EXIT_FAILURE if hostname doesn't match.
authorSimon Ruderich <simon@ruderich.org>
Tue, 15 Mar 2011 20:35:21 +0000 (21:35 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 15 Mar 2011 20:35:21 +0000 (21:35 +0100)
tests/client.c

index 3f2dc4b66f7ccaddaaff185b23d59410e96ee5a7..96f688b18eda2618948f391f5e83edda137420c7 100644 (file)
@@ -151,6 +151,7 @@ int main (int argc, char *argv[]) {
     /* Check hostname. */
     if (!gnutls_x509_crt_check_hostname(cert, argv[4])) {
         fprintf(stderr, "hostname didn't match '%s'\n", argv[4]);
+        return EXIT_FAILURE;
     }
 
     gnutls_x509_crt_deinit(cert);