Don't run the TLSv1.3 CCS tests if TLSv1.3 is not enabled
[openssl.git] / test / clienthellotest.c
index acd27d4a2bc5d9f0c57da87b6f025ddbfadb59e8..88e0a1c66aa00932f9b8b9ad76d6c2428ea163d4 100644 (file)
@@ -90,6 +90,8 @@ static int test_client_hello(int currtest)
     case TEST_ADD_PADDING:
     case TEST_PADDING_NOT_NEEDED:
         SSL_CTX_set_options(ctx, SSL_OP_TLSEXT_PADDING);
+        /* Make sure we get a consistent size across TLS versions */
+        SSL_CTX_clear_options(ctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT);
         /*
          * Add some dummy ALPN protocols so that the ClientHello is at least
          * F5_WORKAROUND_MIN_MSG_LEN bytes long - meaning padding will be
@@ -126,7 +128,7 @@ static int test_client_hello(int currtest)
          * We reset the creation time so that we don't discard the session as
          * too old.
          */
-        if (!TEST_true(SSL_SESSION_set_time(sess, time(NULL)))
+        if (!TEST_true(SSL_SESSION_set_time(sess, (long)time(NULL)))
                 || !TEST_true(SSL_set_session(con, sess)))
             goto end;
     }