]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
added check for client hello extensions.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 27 Feb 2002 20:26:23 +0000 (20:26 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 27 Feb 2002 20:26:23 +0000 (20:26 +0000)
src/cli.c
src/tests.c
src/tests.h
src/tls_test.c

index d593e7b45259d0843d2099e6950bfaeb96c1e472..a3fb8e91ad07bf4a08d8a88300a825ba7360d82b 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -157,6 +157,7 @@ int main(int argc, char **argv)
                fprintf(stderr, "memory error\n");
                exit(1);
        }
+
        ret =
            gnutls_certificate_set_x509_trust_file(xcred, CAFILE, CRLFILE);
        if (ret < 0) {
index 4555f53cbfb7cc7318dc98d7a35906fbd231ce9a..7f77fb70a3cbfcadd0f8b7e3410cba7d4d3345ea 100644 (file)
@@ -302,6 +302,21 @@ int ret;
        return FAILED;
 }
 
+int test_hello_extension( GNUTLS_STATE state) {
+int ret;
+       ADD_ALL_CIPHERS(state);
+       ADD_ALL_COMP(state);
+       ADD_ALL_CERTTYPES(state);
+       ADD_ALL_PROTOCOLS(state);
+       ADD_ALL_MACS(state);
+       ADD_ALL_KX(state);
+       gnutls_cred_set(state, GNUTLS_CRD_CERTIFICATE, xcred);
+       gnutls_record_set_max_size( state, 512);
+
+       ret = do_handshake( state);
+       return ret;
+}
+
 
 int test_version_rollback( GNUTLS_STATE state) {
 int ret;
index 282cee3a60f254e315460a7498ad57f4c55e03ba..938fb6d8e1f03f54b671b315ada0ac8f503a8d45 100644 (file)
@@ -5,6 +5,7 @@
 #define UNSURE -1
 
 int test_srp( GNUTLS_STATE state);
+int test_hello_extension( GNUTLS_STATE state);
 int test_dhe( GNUTLS_STATE state);
 int test_ssl3( GNUTLS_STATE state);
 int test_aes( GNUTLS_STATE state);
index 704909e3bb80fa40a6be0597f7750c6b5bf6fb45..58fd834c87d17e35b90d81c43fcc80a3f38ee4b6 100644 (file)
@@ -83,15 +83,16 @@ static const TLS_TEST tls_tests[] = {
        /* this test will disable TLS 1.0 if the server is 
         * buggy */
        { "whether we need disable TLS 1.0", test_tls1_2, "no", "yes", "dunno" },
+       { "whether the server can accept Hello Extensions", test_hello_extension, "yes", "no", "dunno"},
        { "for anonymous authentication support", test_anonymous, "yes", "no", "dunno"},
        { "for ephemeral Diffie Hellman support", test_dhe, "yes", "no", "dunno" },
-       { "for SRP authentication support", test_srp, "yes", "no", "dunno" },
-       { "for TLS extension - max record size", test_max_record_size, "yes", "no", "dunno" },
        { "for AES cipher support", test_aes, "yes", "no", "dunno"},
        { "for 3DES cipher support", test_3des, "yes", "no", "dunno"},
        { "for ARCFOUR cipher support", test_arcfour, "yes", "no", "dunno"},
        { "for MD5 MAC support", test_md5, "yes", "no", "dunno"},
        { "for SHA1 MAC support", test_sha, "yes", "no", "dunno"},
+       { "for max record size TLS extension", test_max_record_size, "yes", "no", "dunno" },
+       { "for SRP authentication support (gnutls extension)", test_srp, "yes", "no", "dunno" },
        { NULL }
 };