summaryrefslogtreecommitdiff
path: root/tests/nul-in-x509-names.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-04-14 14:51:01 +0200
committerSimon Josefsson <simon@josefsson.org>2010-04-14 14:51:01 +0200
commita23f37448755d89924f791999432b76f490cb2bf (patch)
tree188c331f124e69d62fc7e9be2d8d5cab90469b24 /tests/nul-in-x509-names.c
parent705aa8cd3da09abedd6eb5d0d55610b644e4f98d (diff)
downloadgnutls-a23f37448755d89924f791999432b76f490cb2bf.tar.gz
Indent code.
Diffstat (limited to 'tests/nul-in-x509-names.c')
-rw-r--r--tests/nul-in-x509-names.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/tests/nul-in-x509-names.c b/tests/nul-in-x509-names.c
index c4b85f7a6b..6995826c4f 100644
--- a/tests/nul-in-x509-names.c
+++ b/tests/nul-in-x509-names.c
@@ -30,7 +30,7 @@
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#include "utils.h"
+#include "utils.h"
/* Thanks to Tomas Hoger <thoger@redhat.com> for generating the two
certs that trigger this bug. */
@@ -90,7 +90,8 @@ const gnutls_datum_t badguy_nul_san = {
badguy_nul_san_data, sizeof (badguy_nul_san_data)
};
-void doit(void)
+void
+doit (void)
{
gnutls_x509_crt_t crt;
int ret;
@@ -99,48 +100,50 @@ void doit(void)
if (ret < 0)
{
fail ("gnutls_global_init");
- exit(1);
+ exit (1);
}
ret = gnutls_x509_crt_init (&crt);
if (ret != 0)
{
- fail("gnutls_x509_crt_init");
- exit(1);
+ fail ("gnutls_x509_crt_init");
+ exit (1);
}
ret = gnutls_x509_crt_import (crt, &badguy_nul_cn, GNUTLS_X509_FMT_PEM);
if (ret < 0)
{
- fail("gnutls_x509_crt_import");
- exit(1);
+ fail ("gnutls_x509_crt_import");
+ exit (1);
}
ret = gnutls_x509_crt_check_hostname (crt, "www.bank.com");
if (ret == 0)
{
- if (debug) success("gnutls_x509_crt_check_hostname OK (NUL-IN-CN)");
+ if (debug)
+ success ("gnutls_x509_crt_check_hostname OK (NUL-IN-CN)");
}
else
{
- fail("gnutls_x509_crt_check_hostname BROKEN (NUL-IN-CN)");
+ fail ("gnutls_x509_crt_check_hostname BROKEN (NUL-IN-CN)");
}
ret = gnutls_x509_crt_import (crt, &badguy_nul_san, GNUTLS_X509_FMT_PEM);
if (ret < 0)
{
fail ("gnutls_x509_crt_import");
- exit(1);
+ exit (1);
}
ret = gnutls_x509_crt_check_hostname (crt, "www.bank.com");
if (ret == 0)
{
- if (debug) success("gnutls_x509_crt_check_hostname OK (NUL-IN-SAN)");
+ if (debug)
+ success ("gnutls_x509_crt_check_hostname OK (NUL-IN-SAN)");
}
else
{
- fail("gnutls_x509_crt_check_hostname BROKEN (NUL-IN-SAN)");
+ fail ("gnutls_x509_crt_check_hostname BROKEN (NUL-IN-SAN)");
}
gnutls_x509_crt_deinit (crt);