[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-21-g22553a5
From: |
Simon Josefsson |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-21-g22553a5 |
Date: |
Mon, 03 May 2010 13:34:02 +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=22553a5d48bcf01b396f6b6ce63f728f5059e9a8
The branch, master has been updated
via 22553a5d48bcf01b396f6b6ce63f728f5059e9a8 (commit)
from 9bf8b4b9f74b9f2b624595eb247dcc8dfdd4c298 (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 22553a5d48bcf01b396f6b6ce63f728f5059e9a8
Author: Simon Josefsson <address@hidden>
Date: Mon May 3 15:33:57 2010 +0200
tests: Add first self-test of safe renegotiation extension.
-----------------------------------------------------------------------
Summary of changes:
tests/safe-renegotiation/Makefile.am | 14 ++++++++++++++
tests/{mini-x509.c => safe-renegotiation/srn1.c} | 21 +++++++++++++--------
2 files changed, 27 insertions(+), 8 deletions(-)
copy tests/{mini-x509.c => safe-renegotiation/srn1.c} (92%)
diff --git a/tests/safe-renegotiation/Makefile.am
b/tests/safe-renegotiation/Makefile.am
index 3b262cd..0d967d8 100644
--- a/tests/safe-renegotiation/Makefile.am
+++ b/tests/safe-renegotiation/Makefile.am
@@ -17,6 +17,20 @@
# along with this file; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/lib/includes \
+ -I$(top_builddir)/lib/includes
+
+AM_LDFLAGS = -no-install
+LDADD = ../../lib/libgnutls.la $(LTLIBGCRYPT) $(LIBSOCKET)
+
+ctests = srn1
+
+check_PROGRAMS = $(ctests)
+TESTS = $(ctests)
+TESTS_ENVIRONMENT = $(VALGRIND)
+
EXTRA_DIST = params.dh
dist_check_SCRIPTS = testsrn
diff --git a/tests/mini-x509.c b/tests/safe-renegotiation/srn1.c
similarity index 92%
copy from tests/mini-x509.c
copy to tests/safe-renegotiation/srn1.c
index 40178d2..013ae9b 100644
--- a/tests/mini-x509.c
+++ b/tests/safe-renegotiation/srn1.c
@@ -20,6 +20,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+/* Code based on ../mini-x509.c.
+ *
+ * This tests that a %INITIAL_SAFE_RENEGOTIATION server will reject
+ * handshakes against clients that do not support the extension.
+ */
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -177,7 +183,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:%INITIAL_SAFE_RENEGOTIATION",
+ NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
@@ -185,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);
@@ -217,13 +225,10 @@ main (int argc, char *argv[])
}
}
}
- while (
- /* Not done: */
- !(cret == GNUTLS_E_SUCCESS && sret == GNUTLS_E_SUCCESS)
- /* No error: */
- && (cret == GNUTLS_E_AGAIN || sret == GNUTLS_E_AGAIN));
+ while ((cret == GNUTLS_E_AGAIN || cret == GNUTLS_E_SUCCESS)
+ && (sret == GNUTLS_E_AGAIN || sret == GNUTLS_E_SUCCESS));
- if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SUCCESS)
+ if (cret != GNUTLS_E_SUCCESS && sret != GNUTLS_E_SAFE_RENEGOTIATION_FAILED)
exit_code = EXIT_FAILURE;
gnutls_bye (client, GNUTLS_SHUT_RDWR);
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-21-g22553a5,
Simon Josefsson <=