summaryrefslogtreecommitdiff
path: root/test/clienthellotest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-11-08 16:10:21 +0000
committerMatt Caswell <matt@openssl.org>2016-11-23 15:31:21 +0000
commit9362c93ebc5b14bf18e82cdebf380ccc52f3d92f (patch)
treeb678e7fc85f02c32520c6aa9e3089d660d684121 /test/clienthellotest.c
parent82c9c030173898b9536a1c8da4e49b4b19251dbd (diff)
downloadopenssl-new-9362c93ebc5b14bf18e82cdebf380ccc52f3d92f.tar.gz
Remove old style NewSessionTicket from TLSv1.3
TLSv1.3 has a NewSessionTicket message, but it is *completely* different to the TLSv1.2 one and may as well have been called something else. This commit removes the old style NewSessionTicket from TLSv1.3. We will have to add the new style one back in later. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/clienthellotest.c')
-rw-r--r--test/clienthellotest.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/clienthellotest.c b/test/clienthellotest.c
index b8157f23c6..4219598846 100644
--- a/test/clienthellotest.c
+++ b/test/clienthellotest.c
@@ -56,10 +56,26 @@ int main(int argc, char *argv[])
for (; currtest < TOTAL_NUM_TESTS; currtest++) {
testresult = 0;
ctx = SSL_CTX_new(TLS_method());
+
+ /*
+ * This test is testing session tickets for <= TLS1.2. It isn't relevant
+ * for TLS1.3
+ */
+ if (ctx == NULL || !SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION))
+ goto end;
+
con = SSL_new(ctx);
+ if (con == NULL)
+ goto end;
rbio = BIO_new(BIO_s_mem());
wbio = BIO_new(BIO_s_mem());
+ if (rbio == NULL || wbio == NULL) {
+ BIO_free(rbio);
+ BIO_free(wbio);
+ goto end;
+ }
+
SSL_set_bio(con, rbio, wbio);
SSL_set_connect_state(con);