summaryrefslogtreecommitdiff
path: root/tests/safe-renegotiation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/safe-renegotiation')
-rw-r--r--tests/safe-renegotiation/srn0.c13
-rw-r--r--tests/safe-renegotiation/srn1.c5
-rw-r--r--tests/safe-renegotiation/srn2.c28
-rw-r--r--tests/safe-renegotiation/srn3.c5
-rw-r--r--tests/safe-renegotiation/srn4.c15
-rw-r--r--tests/safe-renegotiation/srn5.c15
6 files changed, 41 insertions, 40 deletions
diff --git a/tests/safe-renegotiation/srn0.c b/tests/safe-renegotiation/srn0.c
index 351cf71328..7310225578 100644
--- a/tests/safe-renegotiation/srn0.c
+++ b/tests/safe-renegotiation/srn0.c
@@ -29,7 +29,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -289,10 +289,10 @@ main (int argc, char *argv[])
}
}
while (
- /* Not done: */
- !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ /* Not done: */
+ !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
+ /* No error: */
+ && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
exit_code = 1;
@@ -300,7 +300,8 @@ main (int argc, char *argv[])
if (!gnutls_safe_renegotiation_status (client) ||
!gnutls_safe_renegotiation_status (server))
{
- tls_log_func (0, "Rehandshaked session not using safe renegotiation!\n");
+ tls_log_func (0,
+ "Rehandshaked session not using safe renegotiation!\n");
exit_code = EXIT_FAILURE;
}
diff --git a/tests/safe-renegotiation/srn1.c b/tests/safe-renegotiation/srn1.c
index 8cc0d5c213..ee40c3a796 100644
--- a/tests/safe-renegotiation/srn1.c
+++ b/tests/safe-renegotiation/srn1.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -184,8 +184,7 @@ main (int argc, char *argv[])
GNUTLS_X509_FMT_PEM);
gnutls_init (&server, GNUTLS_SERVER);
gnutls_credentials_set (server, GNUTLS_CRD_CERTIFICATE, serverx509cred);
- gnutls_priority_set_direct (server, "NORMAL:%SAFE_RENEGOTIATION",
- NULL);
+ gnutls_priority_set_direct (server, "NORMAL:%SAFE_RENEGOTIATION", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
diff --git a/tests/safe-renegotiation/srn2.c b/tests/safe-renegotiation/srn2.c
index 726ca1b51f..6bc92e9a24 100644
--- a/tests/safe-renegotiation/srn2.c
+++ b/tests/safe-renegotiation/srn2.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -295,10 +295,10 @@ main (int argc, char *argv[])
}
}
while (
- /* Not done: */
- !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ /* Not done: */
+ !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
+ /* No error: */
+ && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
exit_code = 1;
@@ -313,7 +313,7 @@ main (int argc, char *argv[])
/* Check that this API does not affect anything after first
handshake.
- gnutls_safe_negotiation_set_initial (server, 0); */
+ gnutls_safe_negotiation_set_initial (server, 0); */
sret = gnutls_rehandshake (server);
if (debug_level > 0)
@@ -363,10 +363,10 @@ main (int argc, char *argv[])
}
}
while (
- /* Not done: */
- !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ /* Not done: */
+ !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
+ /* No error: */
+ && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
exit_code = 1;
@@ -422,10 +422,10 @@ main (int argc, char *argv[])
}
}
while (
- /* Not done: */
- !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ /* Not done: */
+ !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
+ /* No error: */
+ && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
exit_code = 1;
diff --git a/tests/safe-renegotiation/srn3.c b/tests/safe-renegotiation/srn3.c
index de821e93c4..06457a2dc1 100644
--- a/tests/safe-renegotiation/srn3.c
+++ b/tests/safe-renegotiation/srn3.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -193,8 +193,7 @@ main (int argc, char *argv[])
gnutls_certificate_allocate_credentials (&clientx509cred);
gnutls_init (&client, GNUTLS_CLIENT);
gnutls_credentials_set (client, GNUTLS_CRD_CERTIFICATE, clientx509cred);
- gnutls_priority_set_direct (client, "NORMAL:%SAFE_RENEGOTIATION",
- NULL);
+ gnutls_priority_set_direct (client, "NORMAL:%SAFE_RENEGOTIATION", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
diff --git a/tests/safe-renegotiation/srn4.c b/tests/safe-renegotiation/srn4.c
index a0d8c62c19..488a0c3b69 100644
--- a/tests/safe-renegotiation/srn4.c
+++ b/tests/safe-renegotiation/srn4.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -289,11 +289,11 @@ main (int argc, char *argv[])
}
}
while (
- /* Not done: */
- !(cret == GNUTLS_E_AGAIN
- && sret == GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ /* Not done: */
+ !(cret == GNUTLS_E_AGAIN
+ && sret == GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
+ /* No error: */
+ && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
if (cret != GNUTLS_E_AGAIN && sret != GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
exit_code = 1;
@@ -301,7 +301,8 @@ main (int argc, char *argv[])
if (gnutls_safe_renegotiation_status (client) ||
gnutls_safe_renegotiation_status (server))
{
- tls_log_func (0, "Rehandshaked session not using safe renegotiation!\n");
+ tls_log_func (0,
+ "Rehandshaked session not using safe renegotiation!\n");
exit_code = EXIT_FAILURE;
}
diff --git a/tests/safe-renegotiation/srn5.c b/tests/safe-renegotiation/srn5.c
index 477ebb75a0..91d1b9474f 100644
--- a/tests/safe-renegotiation/srn5.c
+++ b/tests/safe-renegotiation/srn5.c
@@ -29,7 +29,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -295,11 +295,11 @@ main (int argc, char *argv[])
}
}
while (
- /* Not done: */
- !(sret == GNUTLS_E_AGAIN
- && cret == GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ /* Not done: */
+ !(sret == GNUTLS_E_AGAIN
+ && cret == GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
+ /* No error: */
+ && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
if (sret != GNUTLS_E_AGAIN && cret != GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
exit_code = 1;
@@ -307,7 +307,8 @@ main (int argc, char *argv[])
if (gnutls_safe_renegotiation_status (client) ||
gnutls_safe_renegotiation_status (server))
{
- tls_log_func (0, "Rehandshaked session not using safe renegotiation!\n");
+ tls_log_func (0,
+ "Rehandshaked session not using safe renegotiation!\n");
exit_code = EXIT_FAILURE;
}