summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-12-29 16:18:24 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-12-29 16:18:24 +0000
commite97ac6044e4ce5140be60a1a7148c6842bdb3567 (patch)
treea46d6403d91c44693115cc55028c583fc290f44b
parent873151e92968746615741afd40322f60f4f2850f (diff)
downloadgnutls-e97ac6044e4ce5140be60a1a7148c6842bdb3567.tar.gz
added TLS 1.1 protocol detection.
-rw-r--r--src/tests.c19
-rw-r--r--src/tests.h3
-rw-r--r--src/tls_test.c3
3 files changed, 22 insertions, 3 deletions
diff --git a/src/tests.c b/src/tests.c
index 1d4e5ed5ff..9f62fa3f5a 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -500,10 +500,27 @@ int ret;
}
+int test_tls1_1( gnutls_session session) {
+int ret;
+ ADD_ALL_CIPHERS(session);
+ ADD_ALL_COMP(session);
+ ADD_ALL_CERTTYPES(session);
+ ADD_PROTOCOL(session, GNUTLS_TLS1_1);
+ ADD_ALL_MACS(session);
+ ADD_ALL_KX(session);
+ gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
+
+ ret = do_handshake( session);
+ if (ret==SUCCEED) tls1_ok = 1;
+
+ return ret;
+
+}
+
/* Advertize both TLS 1.0 and SSL 3.0. If the connection fails,
* but the previous SSL 3.0 test succeeded then disable TLS 1.0.
*/
-int test_tls1_2( gnutls_session session) {
+int test_tls_disable( gnutls_session session) {
int ret;
ADD_ALL_CIPHERS(session);
ADD_ALL_COMP(session);
diff --git a/src/tests.h b/src/tests.h
index d3c3a6fd2c..2ed83cd8d7 100644
--- a/src/tests.h
+++ b/src/tests.h
@@ -16,7 +16,8 @@ int test_3des( gnutls_session state);
int test_arcfour( gnutls_session state);
int test_arcfour_40( gnutls_session state);
int test_tls1( gnutls_session state);
-int test_tls1_2( gnutls_session state);
+int test_tls1_1( gnutls_session state);
+int test_tls_disable( gnutls_session state);
int test_rsa_pms( gnutls_session state);
int test_max_record_size( gnutls_session state);
int test_version_rollback( gnutls_session state);
diff --git a/src/tls_test.c b/src/tls_test.c
index 7c6097feeb..e7c1c6a825 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -80,6 +80,7 @@ typedef struct {
} TLS_TEST;
static const TLS_TEST tls_tests[] = {
+ { "for TLS 1.1 support", test_tls1_1, "yes", "no", "dunno" },
{ "for TLS 1.0 support", test_tls1, "yes", "no", "dunno" },
{ "for SSL 3.0 support", test_ssl3, "yes", "no", "dunno" },
{ "for version rollback bug in RSA PMS", test_rsa_pms, "no", "yes", "dunno" },
@@ -87,7 +88,7 @@ static const TLS_TEST tls_tests[] = {
/* this test will disable TLS 1.0 if the server is
* buggy */
- { "whether we need to disable TLS 1.0", test_tls1_2, "no", "yes", "dunno" },
+ { "whether we need to disable TLS 1.0", test_tls_disable, "no", "yes", "dunno" },
{ "whether the server ignores the RSA PMS version", test_rsa_pms_version_check, "yes", "no", "dunno"},
{ "whether the server can accept Hello Extensions", test_hello_extension, "yes", "no", "dunno"},