[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-31-g87ff666
From: |
Simon Josefsson |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-31-g87ff666 |
Date: |
Sat, 22 May 2010 16:36:36 +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=87ff666e310cfaf4b9d7ea67be5d36a788c315b3
The branch, master has been updated
via 87ff666e310cfaf4b9d7ea67be5d36a788c315b3 (commit)
from ce53777e3ad877b9d7dc38df4bfbb79e6c1ec136 (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 87ff666e310cfaf4b9d7ea67be5d36a788c315b3
Author: Simon Josefsson <address@hidden>
Date: Sat May 22 18:36:32 2010 +0200
Add more rengotiation self tests.
-----------------------------------------------------------------------
Summary of changes:
tests/safe-renegotiation/Makefile.am | 2 +-
tests/safe-renegotiation/README | 6 ++++++
tests/safe-renegotiation/{srn0.c => srn4.c} | 27 ++++++++++++++-------------
3 files changed, 21 insertions(+), 14 deletions(-)
copy tests/safe-renegotiation/{srn0.c => srn4.c} (92%)
diff --git a/tests/safe-renegotiation/Makefile.am
b/tests/safe-renegotiation/Makefile.am
index 8ca561c..627386f 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
+ctests = srn0 srn1 srn2 srn3 srn4
check_PROGRAMS = $(ctests)
TESTS = $(ctests)
diff --git a/tests/safe-renegotiation/README b/tests/safe-renegotiation/README
index 43a97b5..c6375e4 100644
--- a/tests/safe-renegotiation/README
+++ b/tests/safe-renegotiation/README
@@ -7,3 +7,9 @@ srn0.c:
properly by default on initial connections and on rehandshaked
connections. Consequently, it also verifies that rehandshaked
connections work with the extension enabled.
+
+srn4.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.
diff --git a/tests/safe-renegotiation/srn0.c b/tests/safe-renegotiation/srn4.c
similarity index 92%
copy from tests/safe-renegotiation/srn0.c
copy to tests/safe-renegotiation/srn4.c
index 4de9751..5d37fa0 100644
--- a/tests/safe-renegotiation/srn0.c
+++ b/tests/safe-renegotiation/srn4.c
@@ -20,12 +20,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/* Code based on ../mini-x509-rehandshake.c.
+/* Code based on 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.
+ * 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.
*/
#ifdef HAVE_CONFIG_H
@@ -193,7 +192,8 @@ 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", NULL);
+ gnutls_priority_set_direct (client, "NORMAL:%DISABLE_SAFE_RENEGOTIATION",
+ NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
@@ -234,10 +234,10 @@ 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) ||
+ gnutls_safe_renegotiation_status (server))
{
- tls_log_func (0, "Session not using safe renegotiation!\n");
+ tls_log_func (0, "Session using safe renegotiation but shouldn't!\n");
exit_code = EXIT_FAILURE;
}
@@ -290,15 +290,16 @@ main (int argc, char *argv[])
}
while (
/* Not done: */
- !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
+ !(cret == GNUTLS_E_AGAIN
+ && sret == GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
/* No error: */
&& (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
- if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
+ if (cret != GNUTLS_E_AGAIN && sret != GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED)
exit_code = 1;
- if (!gnutls_safe_renegotiation_status (client) ||
- !gnutls_safe_renegotiation_status (server))
+ 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;
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-31-g87ff666,
Simon Josefsson <=