summaryrefslogtreecommitdiff
path: root/tests/nul-in-x509-names.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-08-04 13:19:32 +0200
committerSimon Josefsson <simon@josefsson.org>2009-08-04 13:19:32 +0200
commite4b7277f93ba881b95dea08fbd58a371465d7864 (patch)
treeaa634b96937d9f5b88da98091c4e41a65ee5b2b6 /tests/nul-in-x509-names.c
parentee72576474b1e6056113cf552c31a9daeadfa800 (diff)
downloadgnutls-e4b7277f93ba881b95dea08fbd58a371465d7864.tar.gz
Exit with failure on failure.
Diffstat (limited to 'tests/nul-in-x509-names.c')
-rw-r--r--tests/nul-in-x509-names.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/nul-in-x509-names.c b/tests/nul-in-x509-names.c
index 9bbd73d875..f79dea0fff 100644
--- a/tests/nul-in-x509-names.c
+++ b/tests/nul-in-x509-names.c
@@ -94,6 +94,7 @@ main (void)
{
gnutls_x509_crt_t crt;
int ret;
+ int exit_code = 0;
ret = gnutls_global_init ();
if (ret < 0)
@@ -124,6 +125,7 @@ main (void)
else
{
puts("gnutls_x509_crt_check_hostname BROKEN (NUL-IN-CN)");
+ exit_code = 1;
}
ret = gnutls_x509_crt_import (crt, &badguy_nul_san, GNUTLS_X509_FMT_PEM);
@@ -141,11 +143,12 @@ main (void)
else
{
puts("gnutls_x509_crt_check_hostname BROKEN (NUL-IN-SAN)");
+ exit_code = 1;
}
gnutls_x509_crt_deinit (crt);
gnutls_global_deinit ();
- return 0;
+ return exit_code;
}