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-30-gce53777


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-30-gce53777
Date: Sat, 22 May 2010 16:12: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=ce53777e3ad877b9d7dc38df4bfbb79e6c1ec136

The branch, master has been updated
       via  ce53777e3ad877b9d7dc38df4bfbb79e6c1ec136 (commit)
      from  bef37bc1f17c833f8a21c2bebd39baaa343b20d3 (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 ce53777e3ad877b9d7dc38df4bfbb79e6c1ec136
Author: Simon Josefsson <address@hidden>
Date:   Sat May 22 18:12:06 2010 +0200

    Add more safe renegotiation self test.

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

Summary of changes:
 tests/safe-renegotiation/Makefile.am               |    4 +-
 tests/safe-renegotiation/README                    |    9 ++++++++
 .../srn0.c}                                        |   22 ++++++++++++++++++++
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 tests/safe-renegotiation/README
 copy tests/{mini-x509-rehandshake.c => safe-renegotiation/srn0.c} (92%)

diff --git a/tests/safe-renegotiation/Makefile.am 
b/tests/safe-renegotiation/Makefile.am
index 2c300f0..8ca561c 100644
--- a/tests/safe-renegotiation/Makefile.am
+++ b/tests/safe-renegotiation/Makefile.am
@@ -25,13 +25,13 @@ AM_CPPFLAGS = \
 AM_LDFLAGS = -no-install
 LDADD = ../../lib/libgnutls.la $(LTLIBGCRYPT) $(LIBSOCKET)
 
-ctests = srn1 srn2 srn3
+ctests = srn0 srn1 srn2 srn3
 
 check_PROGRAMS = $(ctests)
 TESTS = $(ctests)
 TESTS_ENVIRONMENT = $(VALGRIND)
 
-EXTRA_DIST = params.dh
+EXTRA_DIST = README params.dh
 
 dist_check_SCRIPTS = testsrn
 #TESTS = testsrn
diff --git a/tests/safe-renegotiation/README b/tests/safe-renegotiation/README
new file mode 100644
index 0000000..43a97b5
--- /dev/null
+++ b/tests/safe-renegotiation/README
@@ -0,0 +1,9 @@
+Testing safe renegotiation is relatively complex, here is a summary of
+what we test and what how we believe it should work.
+
+srn0.c:
+
+ This tests that the safe renegotiation extension is negotiated
+ properly by default on initial connections and on rehandshaked
+ connections.  Consequently, it also verifies that rehandshaked
+ connections work with the extension enabled.
diff --git a/tests/mini-x509-rehandshake.c b/tests/safe-renegotiation/srn0.c
similarity index 92%
copy from tests/mini-x509-rehandshake.c
copy to tests/safe-renegotiation/srn0.c
index 5664e65..4de9751 100644
--- a/tests/mini-x509-rehandshake.c
+++ b/tests/safe-renegotiation/srn0.c
@@ -20,6 +20,14 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+/* Code based on ../mini-x509-rehandshake.c.
+ *
+ * This tests that the safe renegotiation extension is negotiated
+ * properly by default on initial connections and on rehandshaked
+ * connections.  Consequently, it also verifies that rehandshaked
+ * connections work with the extension enabled.
+ */
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -226,6 +234,13 @@ 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))
+    {
+      tls_log_func (0, "Session not using safe renegotiation!\n");
+      exit_code = EXIT_FAILURE;
+    }
+
   sret = gnutls_rehandshake (server);
   if (debug_level > 0)
     {
@@ -282,6 +297,13 @@ main (int argc, char *argv[])
   if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
     exit_code = 1;
 
+  if (!gnutls_safe_renegotiation_status (client) ||
+      !gnutls_safe_renegotiation_status (server))
+    {
+      tls_log_func (0, "Rehandshaked session not using safe renegotiation!\n");
+      exit_code = EXIT_FAILURE;
+    }
+
   gnutls_bye (client, GNUTLS_SHUT_RDWR);
   gnutls_bye (server, GNUTLS_SHUT_RDWR);
 


hooks/post-receive
-- 
GNU gnutls



reply via email to

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