summaryrefslogtreecommitdiff
path: root/tests/multi-alerts.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/multi-alerts.c')
-rw-r--r--tests/multi-alerts.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/tests/multi-alerts.c b/tests/multi-alerts.c
index 7412d48fa1..1ca2521519 100644
--- a/tests/multi-alerts.c
+++ b/tests/multi-alerts.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -41,18 +41,18 @@ int main(int argc, char **argv)
#else
-# include <string.h>
-# include <sys/types.h>
-# include <sys/socket.h>
-# if !defined(_WIN32)
-# include <sys/wait.h>
-# endif
-# include <unistd.h>
-# include <assert.h>
-# include <gnutls/gnutls.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#if !defined(_WIN32)
+#include <sys/wait.h>
+#endif
+#include <unistd.h>
+#include <assert.h>
+#include <gnutls/gnutls.h>
-# include "utils.h"
-# include "cert-common.h"
+#include "utils.h"
+#include "cert-common.h"
pid_t child;
@@ -62,46 +62,46 @@ static void tls_log_func(int level, const char *str)
str);
}
-static unsigned char tls_hello[] =
- "\x16\x03\x01\x01\x38\x01\x00\x01"
- "\x34\x03\x03\xfc\x77\xa8\xc7\x46"
- "\xf7\xfd\x04\x5b\x3c\xc6\xfa\xa4"
- "\xea\x3e\xfa\x76\x99\xfe\x1a\x2e"
- "\xe0\x79\x17\xb2\x27\x06\xc4\x5c"
- "\xd8\x78\x31\x00\x00\xb6\xc0\x30"
- "\xc0\x2c\xc0\x28\xc0\x24\xc0\x14"
- "\xc0\x0a\x00\xa5\x00\xa3\x00\xa1"
- "\x00\x9f\x00\x6b\x00\x6a\x00\x69"
- "\x00\x68\x00\x39\x00\x38\x00\x37"
- "\x00\x36\x00\x88\x00\x87\x00\x86"
- "\x00\x85\xc0\x32\xc0\x2e\xc0\x2a"
- "\xc0\x26\xc0\x0f\xc0\x05\x00\x9d"
- "\x00\x3d\x00\x35\x00\x84\xc0\x2f"
- "\xc0\x2b\xc0\x27\xc0\x23\xc0\x13"
- "\xc0\x09\x00\xa4\x00\xa2\x00\xa0"
- "\x00\x9e\x00\x67\x00\x40\x00\x3f"
- "\x00\x3e\x00\x33\x00\x32\x00\x31"
- "\x00\x30\x00\x9a\x00\x99\x00\x98"
- "\x00\x97\x00\x45\x00\x44\x00\x43"
- "\x00\x42\xc0\x31\xc0\x2d\xc0\x29"
- "\xc0\x25\xc0\x0e\xc0\x04\x00\x9c"
- "\x00\x3c\x00\x2f\x00\x96\x00\x41"
- "\x00\x07\xc0\x11\xc0\x07\xc0\x0c"
- "\xc0\x02\x00\x05\x00\x04\xc0\x12"
- "\xc0\x08\x00\x16\x00\x13\x00\x10"
- "\x00\x0d\xc0\x0d\xc0\x03\x00\x0a"
- "\x00\x15\x00\x12\x00\x0f\x00\x0c"
- "\x00\x09\x00\xff\x01\x00\x00\x55"
- "\x00\x0b\x00\x04\x03\x00\x01\x02"
- "\x00\x0a\x00\x1c\x00\x1a\x00\x17"
- "\x00\x19\x00\x1c\x00\x1b\x00\x18"
- "\x00\x1a\x00\x16\x00\x0e\x00\x0d"
- "\x00\x0b\x00\x0c\x00\x09\x00\x0a"
- "\x00\x23\x00\x00\x00\x0d\x00\x20"
- "\x00\x1e\x06\x01\x06\x02\x06\x03"
- "\x05\x01\x05\x02\x05\x03\x04\x01"
- "\x04\x02\x04\x03\x03\x01\x03\x02"
- "\x03\x03\x02\x01\x02\x02\x02\x03" "\x00\x0f\x00\x01\x01";
+static unsigned char tls_hello[] = "\x16\x03\x01\x01\x38\x01\x00\x01"
+ "\x34\x03\x03\xfc\x77\xa8\xc7\x46"
+ "\xf7\xfd\x04\x5b\x3c\xc6\xfa\xa4"
+ "\xea\x3e\xfa\x76\x99\xfe\x1a\x2e"
+ "\xe0\x79\x17\xb2\x27\x06\xc4\x5c"
+ "\xd8\x78\x31\x00\x00\xb6\xc0\x30"
+ "\xc0\x2c\xc0\x28\xc0\x24\xc0\x14"
+ "\xc0\x0a\x00\xa5\x00\xa3\x00\xa1"
+ "\x00\x9f\x00\x6b\x00\x6a\x00\x69"
+ "\x00\x68\x00\x39\x00\x38\x00\x37"
+ "\x00\x36\x00\x88\x00\x87\x00\x86"
+ "\x00\x85\xc0\x32\xc0\x2e\xc0\x2a"
+ "\xc0\x26\xc0\x0f\xc0\x05\x00\x9d"
+ "\x00\x3d\x00\x35\x00\x84\xc0\x2f"
+ "\xc0\x2b\xc0\x27\xc0\x23\xc0\x13"
+ "\xc0\x09\x00\xa4\x00\xa2\x00\xa0"
+ "\x00\x9e\x00\x67\x00\x40\x00\x3f"
+ "\x00\x3e\x00\x33\x00\x32\x00\x31"
+ "\x00\x30\x00\x9a\x00\x99\x00\x98"
+ "\x00\x97\x00\x45\x00\x44\x00\x43"
+ "\x00\x42\xc0\x31\xc0\x2d\xc0\x29"
+ "\xc0\x25\xc0\x0e\xc0\x04\x00\x9c"
+ "\x00\x3c\x00\x2f\x00\x96\x00\x41"
+ "\x00\x07\xc0\x11\xc0\x07\xc0\x0c"
+ "\xc0\x02\x00\x05\x00\x04\xc0\x12"
+ "\xc0\x08\x00\x16\x00\x13\x00\x10"
+ "\x00\x0d\xc0\x0d\xc0\x03\x00\x0a"
+ "\x00\x15\x00\x12\x00\x0f\x00\x0c"
+ "\x00\x09\x00\xff\x01\x00\x00\x55"
+ "\x00\x0b\x00\x04\x03\x00\x01\x02"
+ "\x00\x0a\x00\x1c\x00\x1a\x00\x17"
+ "\x00\x19\x00\x1c\x00\x1b\x00\x18"
+ "\x00\x1a\x00\x16\x00\x0e\x00\x0d"
+ "\x00\x0b\x00\x0c\x00\x09\x00\x0a"
+ "\x00\x23\x00\x00\x00\x0d\x00\x20"
+ "\x00\x1e\x06\x01\x06\x02\x06\x03"
+ "\x05\x01\x05\x02\x05\x03\x04\x01"
+ "\x04\x02\x04\x03\x03\x01\x03\x02"
+ "\x03\x03\x02\x01\x02\x02\x02\x03"
+ "\x00\x0f\x00\x01\x01";
static unsigned char tls_alert[] = "\x15\x03\x03\x00\x02\x00\x0A";
@@ -162,8 +162,8 @@ static void server(int sd)
/* avoid calling all the priority functions, since the defaults
* are adequate.
*/
- assert(gnutls_priority_set_direct
- (session, "NORMAL:-VERS-ALL:+VERS-TLS1.2", NULL) >= 0);
+ assert(gnutls_priority_set_direct(
+ session, "NORMAL:-VERS-ALL:+VERS-TLS1.2", NULL) >= 0);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);
@@ -174,8 +174,8 @@ static void server(int sd)
loops++;
if (loops > 64)
fail("Too many loops in the handshake!\n");
- } while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN
- || ret == GNUTLS_E_WARNING_ALERT_RECEIVED);
+ } while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN ||
+ ret == GNUTLS_E_WARNING_ALERT_RECEIVED);
if (ret >= 0) {
fail("server: Handshake succeeded unexpectedly\n");
@@ -231,4 +231,4 @@ void doit(void)
}
}
-#endif /* _WIN32 */
+#endif /* _WIN32 */