diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-12-16 17:30:42 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-12-16 17:30:42 +0100 |
commit | 6eb6bbfe8e504a611145f454f4045e8f49fd5e44 (patch) | |
tree | baba850cc86ee2d9d61de89da1cdfe408ad8694a /tests/safe-renegotiation | |
parent | bdcfdac13179eccee6294402f2654fece149f82b (diff) | |
download | gnutls-6eb6bbfe8e504a611145f454f4045e8f49fd5e44.tar.gz |
Indented code. Use same indentation but with -nut to avoid usage of tabs. In several editors tabs can be configured not to be 8 spaces and this produces artifacts with the current indentation that is a mixture of tabs and spaces.
Diffstat (limited to 'tests/safe-renegotiation')
-rw-r--r-- | tests/safe-renegotiation/srn0.c | 102 | ||||
-rw-r--r-- | tests/safe-renegotiation/srn1.c | 50 | ||||
-rw-r--r-- | tests/safe-renegotiation/srn2.c | 192 | ||||
-rw-r--r-- | tests/safe-renegotiation/srn3.c | 50 | ||||
-rw-r--r-- | tests/safe-renegotiation/srn4.c | 106 | ||||
-rw-r--r-- | tests/safe-renegotiation/srn5.c | 106 |
6 files changed, 303 insertions, 303 deletions
diff --git a/tests/safe-renegotiation/srn0.c b/tests/safe-renegotiation/srn0.c index 7310225578..629fd7664b 100644 --- a/tests/safe-renegotiation/srn0.c +++ b/tests/safe-renegotiation/srn0.c @@ -181,8 +181,8 @@ main (int argc, char *argv[]) /* Init server */ gnutls_certificate_allocate_credentials (&serverx509cred); gnutls_certificate_set_x509_key_mem (serverx509cred, - &server_cert, &server_key, - GNUTLS_X509_FMT_PEM); + &server_cert, &server_key, + GNUTLS_X509_FMT_PEM); gnutls_init (&server, GNUTLS_SERVER); gnutls_credentials_set (server, GNUTLS_CRD_CERTIFICATE, serverx509cred); gnutls_priority_set_direct (server, "NORMAL", NULL); @@ -201,35 +201,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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 = EXIT_FAILURE; @@ -264,35 +264,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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; @@ -301,7 +301,7 @@ main (int argc, char *argv[]) !gnutls_safe_renegotiation_status (server)) { tls_log_func (0, - "Rehandshaked session not using safe renegotiation!\n"); + "Rehandshaked session not using safe renegotiation!\n"); exit_code = EXIT_FAILURE; } @@ -321,9 +321,9 @@ main (int argc, char *argv[]) if (debug_level > 0) { if (exit_code == 0) - puts ("Self-test successful"); + puts ("Self-test successful"); else - puts ("Self-test failed"); + puts ("Self-test failed"); } return exit_code; diff --git a/tests/safe-renegotiation/srn1.c b/tests/safe-renegotiation/srn1.c index ee40c3a796..2b996b0c94 100644 --- a/tests/safe-renegotiation/srn1.c +++ b/tests/safe-renegotiation/srn1.c @@ -180,8 +180,8 @@ main (int argc, char *argv[]) /* Init server */ gnutls_certificate_allocate_credentials (&serverx509cred); gnutls_certificate_set_x509_key_mem (serverx509cred, - &server_cert, &server_key, - GNUTLS_X509_FMT_PEM); + &server_cert, &server_key, + 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); @@ -193,7 +193,7 @@ main (int argc, char *argv[]) gnutls_init (&client, GNUTLS_CLIENT); gnutls_credentials_set (client, GNUTLS_CRD_CERTIFICATE, clientx509cred); gnutls_priority_set_direct (client, "NORMAL:%DISABLE_SAFE_RENEGOTIATION", - NULL); + NULL); gnutls_transport_set_push_function (client, client_push); gnutls_transport_set_pull_function (client, client_pull); @@ -209,32 +209,32 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } while ((cret == GNUTLS_E_AGAIN || cret == GNUTLS_E_SUCCESS) - && (sret == GNUTLS_E_AGAIN || sret == GNUTLS_E_SUCCESS)); + && (sret == GNUTLS_E_AGAIN || sret == GNUTLS_E_SUCCESS)); if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SAFE_RENEGOTIATION_FAILED) exit_code = EXIT_FAILURE; @@ -255,9 +255,9 @@ main (int argc, char *argv[]) if (debug_level > 0) { if (exit_code == 0) - puts ("Self-test successful"); + puts ("Self-test successful"); else - puts ("Self-test failed"); + puts ("Self-test failed"); } return exit_code; diff --git a/tests/safe-renegotiation/srn2.c b/tests/safe-renegotiation/srn2.c index 6bc92e9a24..8c9d444c6b 100644 --- a/tests/safe-renegotiation/srn2.c +++ b/tests/safe-renegotiation/srn2.c @@ -178,8 +178,8 @@ main (int argc, char *argv[]) /* Init server */ gnutls_certificate_allocate_credentials (&serverx509cred); gnutls_certificate_set_x509_key_mem (serverx509cred, - &server_cert, &server_key, - GNUTLS_X509_FMT_PEM); + &server_cert, &server_key, + GNUTLS_X509_FMT_PEM); gnutls_init (&server, GNUTLS_SERVER); gnutls_credentials_set (server, GNUTLS_CRD_CERTIFICATE, serverx509cred); gnutls_priority_set_direct (server, "NORMAL", NULL); @@ -206,35 +206,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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 = EXIT_FAILURE; @@ -270,35 +270,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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; @@ -338,35 +338,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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; @@ -397,35 +397,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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; @@ -446,9 +446,9 @@ main (int argc, char *argv[]) if (debug_level > 0) { if (exit_code == 0) - puts ("Self-test successful"); + puts ("Self-test successful"); else - puts ("Self-test failed"); + puts ("Self-test failed"); } return exit_code; diff --git a/tests/safe-renegotiation/srn3.c b/tests/safe-renegotiation/srn3.c index 06457a2dc1..71f0ac31ca 100644 --- a/tests/safe-renegotiation/srn3.c +++ b/tests/safe-renegotiation/srn3.c @@ -180,12 +180,12 @@ main (int argc, char *argv[]) /* Init server */ gnutls_certificate_allocate_credentials (&serverx509cred); gnutls_certificate_set_x509_key_mem (serverx509cred, - &server_cert, &server_key, - GNUTLS_X509_FMT_PEM); + &server_cert, &server_key, + GNUTLS_X509_FMT_PEM); gnutls_init (&server, GNUTLS_SERVER); gnutls_credentials_set (server, GNUTLS_CRD_CERTIFICATE, serverx509cred); gnutls_priority_set_direct (server, "NORMAL:%DISABLE_SAFE_RENEGOTIATION", - NULL); + NULL); gnutls_transport_set_push_function (server, server_push); gnutls_transport_set_pull_function (server, server_pull); @@ -209,32 +209,32 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } while ((cret == GNUTLS_E_AGAIN || cret == GNUTLS_E_SUCCESS) - && (sret == GNUTLS_E_AGAIN || sret == GNUTLS_E_SUCCESS)); + && (sret == GNUTLS_E_AGAIN || sret == GNUTLS_E_SUCCESS)); if (cret != GNUTLS_E_SAFE_RENEGOTIATION_FAILED && sret != GNUTLS_E_SUCCESS) exit_code = EXIT_FAILURE; @@ -255,9 +255,9 @@ main (int argc, char *argv[]) if (debug_level > 0) { if (exit_code == 0) - puts ("Self-test successful"); + puts ("Self-test successful"); else - puts ("Self-test failed"); + puts ("Self-test failed"); } return exit_code; diff --git a/tests/safe-renegotiation/srn4.c b/tests/safe-renegotiation/srn4.c index 488a0c3b69..8ab1bb2ea6 100644 --- a/tests/safe-renegotiation/srn4.c +++ b/tests/safe-renegotiation/srn4.c @@ -180,8 +180,8 @@ main (int argc, char *argv[]) /* Init server */ gnutls_certificate_allocate_credentials (&serverx509cred); gnutls_certificate_set_x509_key_mem (serverx509cred, - &server_cert, &server_key, - GNUTLS_X509_FMT_PEM); + &server_cert, &server_key, + GNUTLS_X509_FMT_PEM); gnutls_init (&server, GNUTLS_SERVER); gnutls_credentials_set (server, GNUTLS_CRD_CERTIFICATE, serverx509cred); gnutls_priority_set_direct (server, "NORMAL", NULL); @@ -193,7 +193,7 @@ main (int argc, char *argv[]) gnutls_init (&client, GNUTLS_CLIENT); gnutls_credentials_set (client, GNUTLS_CRD_CERTIFICATE, clientx509cred); gnutls_priority_set_direct (client, "NORMAL:%DISABLE_SAFE_RENEGOTIATION", - NULL); + NULL); gnutls_transport_set_push_function (client, client_push); gnutls_transport_set_pull_function (client, client_pull); @@ -201,35 +201,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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 = EXIT_FAILURE; @@ -264,36 +264,36 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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; @@ -302,7 +302,7 @@ main (int argc, char *argv[]) gnutls_safe_renegotiation_status (server)) { tls_log_func (0, - "Rehandshaked session not using safe renegotiation!\n"); + "Rehandshaked session not using safe renegotiation!\n"); exit_code = EXIT_FAILURE; } @@ -322,9 +322,9 @@ main (int argc, char *argv[]) if (debug_level > 0) { if (exit_code == 0) - puts ("Self-test successful"); + puts ("Self-test successful"); else - puts ("Self-test failed"); + puts ("Self-test failed"); } return exit_code; diff --git a/tests/safe-renegotiation/srn5.c b/tests/safe-renegotiation/srn5.c index 91d1b9474f..2eb1975143 100644 --- a/tests/safe-renegotiation/srn5.c +++ b/tests/safe-renegotiation/srn5.c @@ -181,12 +181,12 @@ main (int argc, char *argv[]) /* Init server */ gnutls_certificate_allocate_credentials (&serverx509cred); gnutls_certificate_set_x509_key_mem (serverx509cred, - &server_cert, &server_key, - GNUTLS_X509_FMT_PEM); + &server_cert, &server_key, + GNUTLS_X509_FMT_PEM); gnutls_init (&server, GNUTLS_SERVER); gnutls_credentials_set (server, GNUTLS_CRD_CERTIFICATE, serverx509cred); gnutls_priority_set_direct (server, "NORMAL:%DISABLE_SAFE_RENEGOTIATION", - NULL); + NULL); gnutls_transport_set_push_function (server, server_push); gnutls_transport_set_pull_function (server, server_pull); @@ -202,35 +202,35 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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 = EXIT_FAILURE; @@ -270,36 +270,36 @@ main (int argc, char *argv[]) { static int max_iter = 0; if (max_iter++ > 10) - abort (); + abort (); if (cret == GNUTLS_E_AGAIN) - { - cret = gnutls_handshake (client); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (client)...\n"); - tls_log_func (0, gnutls_strerror (cret)); - tls_log_func (0, "\n"); - } - } + { + cret = gnutls_handshake (client); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (client)...\n"); + tls_log_func (0, gnutls_strerror (cret)); + tls_log_func (0, "\n"); + } + } if (sret == GNUTLS_E_AGAIN) - { - sret = gnutls_handshake (server); - if (debug_level > 0) - { - tls_log_func (0, "second gnutls_handshake (server)...\n"); - tls_log_func (0, gnutls_strerror (sret)); - tls_log_func (0, "\n"); - } - } + { + sret = gnutls_handshake (server); + if (debug_level > 0) + { + tls_log_func (0, "second gnutls_handshake (server)...\n"); + tls_log_func (0, gnutls_strerror (sret)); + tls_log_func (0, "\n"); + } + } } 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; @@ -308,7 +308,7 @@ main (int argc, char *argv[]) gnutls_safe_renegotiation_status (server)) { tls_log_func (0, - "Rehandshaked session not using safe renegotiation!\n"); + "Rehandshaked session not using safe renegotiation!\n"); exit_code = EXIT_FAILURE; } @@ -328,9 +328,9 @@ main (int argc, char *argv[]) if (debug_level > 0) { if (exit_code == 0) - puts ("Self-test successful"); + puts ("Self-test successful"); else - puts ("Self-test failed"); + puts ("Self-test failed"); } return exit_code; |