diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2016-03-02 22:38:08 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2016-03-09 19:39:54 +0100 |
commit | 885e601d97ff235615809db832874ff8dad9cb24 (patch) | |
tree | 03b651018355ee612bca32f395ced7ec5862c067 /test/clienthellotest.c | |
parent | 0d5301aff900970b09d2fe0c70d1038157d7638b (diff) | |
download | openssl-885e601d97ff235615809db832874ff8dad9cb24.tar.gz |
Use version flexible method instead of fixed version
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1824
Diffstat (limited to 'test/clienthellotest.c')
-rw-r--r-- | test/clienthellotest.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/test/clienthellotest.c b/test/clienthellotest.c index 14fa4c0a12..71c6650f78 100644 --- a/test/clienthellotest.c +++ b/test/clienthellotest.c @@ -72,19 +72,13 @@ #define EXTENSION_SIZE_LEN 2 -#define TOTAL_NUM_TESTS 2 - -/* - * Test that explicitly setting ticket data results in it appearing in the - * ClientHello for TLS1.2 - */ -#define TEST_SET_SESSION_TICK_DATA_TLS_1_2 0 +#define TOTAL_NUM_TESTS 1 /* * Test that explicitly setting ticket data results in it appearing in the * ClientHello for a negotiated SSL/TLS version */ -#define TEST_SET_SESSION_TICK_DATA_VER_NEG 1 +#define TEST_SET_SESSION_TICK_DATA_VER_NEG 0 int main(int argc, char *argv[]) { @@ -114,16 +108,7 @@ int main(int argc, char *argv[]) */ for (; currtest < TOTAL_NUM_TESTS; currtest++) { testresult = 0; - if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2) { -#ifndef OPENSSL_NO_TLS1_2_METHOD - ctx = SSL_CTX_new(TLSv1_2_method()); -#else - testresult = 1; - continue; -#endif - } else { - ctx = SSL_CTX_new(TLS_method()); - } + ctx = SSL_CTX_new(TLS_method()); con = SSL_new(ctx); rbio = BIO_new(BIO_s_mem()); @@ -131,8 +116,7 @@ int main(int argc, char *argv[]) SSL_set_bio(con, rbio, wbio); SSL_set_connect_state(con); - if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2 - || currtest == TEST_SET_SESSION_TICK_DATA_VER_NEG) { + if (currtest == TEST_SET_SESSION_TICK_DATA_VER_NEG) { if (!SSL_set_session_ticket_ext(con, dummytick, strlen(dummytick))) goto end; } @@ -184,8 +168,7 @@ int main(int argc, char *argv[]) goto end; if (type == TLSEXT_TYPE_session_ticket) { - if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2 - || currtest == TEST_SET_SESSION_TICK_DATA_VER_NEG) { + if (currtest == TEST_SET_SESSION_TICK_DATA_VER_NEG) { if (size == strlen(dummytick) && memcmp(data, dummytick, size) == 0) { /* Ticket data is as we expected */ |