gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-32-gf623b99


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-32-gf623b99
Date: Sat, 22 May 2010 17:09:23 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=f623b9904535b87ff2a00a31c79d1ec6076979c1

The branch, master has been updated
       via  f623b9904535b87ff2a00a31c79d1ec6076979c1 (commit)
      from  87ff666e310cfaf4b9d7ea67be5d36a788c315b3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f623b9904535b87ff2a00a31c79d1ec6076979c1
Author: Simon Josefsson <address@hidden>
Date:   Sat May 22 19:09:16 2010 +0200

    Add test of self renegotiation APIs.

-----------------------------------------------------------------------

Summary of changes:
 tests/safe-renegotiation/Makefile.am        |    2 +-
 tests/safe-renegotiation/{srn4.c => srn5.c} |   25 ++++++++++++++++---------
 2 files changed, 17 insertions(+), 10 deletions(-)
 copy tests/safe-renegotiation/{srn4.c => srn5.c} (93%)

diff --git a/tests/safe-renegotiation/Makefile.am 
b/tests/safe-renegotiation/Makefile.am
index 627386f..a8c9608 100644
--- a/tests/safe-renegotiation/Makefile.am
+++ b/tests/safe-renegotiation/Makefile.am
@@ -25,7 +25,7 @@ AM_CPPFLAGS = \
 AM_LDFLAGS = -no-install
 LDADD = ../../lib/libgnutls.la $(LTLIBGCRYPT) $(LIBSOCKET)
 
-ctests = srn0 srn1 srn2 srn3 srn4
+ctests = srn0 srn1 srn2 srn3 srn4 srn5
 
 check_PROGRAMS = $(ctests)
 TESTS = $(ctests)
diff --git a/tests/safe-renegotiation/srn4.c b/tests/safe-renegotiation/srn5.c
similarity index 93%
copy from tests/safe-renegotiation/srn4.c
copy to tests/safe-renegotiation/srn5.c
index 5d37fa0..c929cb0 100644
--- a/tests/safe-renegotiation/srn4.c
+++ b/tests/safe-renegotiation/srn5.c
@@ -22,9 +22,9 @@
 
 /* Code based on srn0.c.
  *
- * This tests that clients without support for safe renegotiation is
- * able to handshake properly against a default GnuTLS server, but
- * that rehandshake will be refused by the server.
+ * This tests that clients with support for safe renegotiation is able
+ * to handshake properly against a server with no support for safe
+ * renegotiation, but that the client will not perform a rehandshake.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -184,7 +184,8 @@ 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", NULL);
+  gnutls_priority_set_direct (server, "NORMAL:%DISABLE_SAFE_RENEGOTIATION",
+                             NULL);
   gnutls_transport_set_push_function (server, server_push);
   gnutls_transport_set_pull_function (server, server_pull);
 
@@ -192,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:%DISABLE_SAFE_RENEGOTIATION",
-                             NULL);
+  gnutls_priority_set_direct (client, "NORMAL", NULL);
   gnutls_transport_set_push_function (client, client_push);
   gnutls_transport_set_pull_function (client, client_pull);
 
@@ -234,13 +234,20 @@ main (int argc, char *argv[])
   if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
     exit_code = EXIT_FAILURE;
 
-  if (gnutls_safe_renegotiation_status (client) ||
-      gnutls_safe_renegotiation_status (server))
+  if (gnutls_safe_renegotiation_status (client))
     {
-      tls_log_func (0, "Session using safe renegotiation but shouldn't!\n");
+      tls_log_func (0, "Client thinks it is using safe renegotiation!\n");
       exit_code = EXIT_FAILURE;
     }
 
+  if (gnutls_safe_renegotiation_status (server))
+    {
+      tls_log_func (0, "Server thinks it is using safe renegotiation!\n");
+      exit_code = EXIT_FAILURE;
+    }
+
+  abort ();
+
   sret = gnutls_rehandshake (server);
   if (debug_level > 0)
     {


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]