adapt tests to SSL_OP_LEGACY_SERVER_CONNECT change
authorBenjamin Kaduk <bkaduk@akamai.com>
Mon, 3 May 2021 20:23:53 +0000 (13:23 -0700)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 5 May 2021 15:13:51 +0000 (08:13 -0700)
The "bad DTLS" tests run into trouble due to the special behavior
for that "bad" version, and the SSL record tests need to set the
-legacy_server_connect flag to allow an SSLv2 ClientHello to work
against any TLS server (since SSLv2 ClientHello messages cannot
carry extensions as would be needed in order to negotiate the use
of the renegitiation_info extension).

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15127)

test/bad_dtls_test.c
test/recipes/70-test_sslrecords.t

index 48cf45bae632b728e7eea241db422a06a7a87ba2..a67db1737eaf949f7a4ea3e6d210ab1adcf2ea93 100644 (file)
@@ -494,6 +494,8 @@ static int test_bad_dtls(void)
     if (!TEST_ptr(ctx)
             || !TEST_true(SSL_CTX_set_min_proto_version(ctx, DTLS1_BAD_VER))
             || !TEST_true(SSL_CTX_set_max_proto_version(ctx, DTLS1_BAD_VER))
+            || !TEST_true(SSL_CTX_set_options(ctx,
+                                              SSL_OP_LEGACY_SERVER_CONNECT))
             || !TEST_true(SSL_CTX_set_cipher_list(ctx, "AES128-SHA")))
         goto end;
 
index 729a41856ddc20b4fcf2b4251a596f30f07fbb03..318c9235b0c9f78f6c52ad7a2927d2de207a34f9 100644 (file)
@@ -96,7 +96,7 @@ my $sslv2testtype = TLSV1_2_IN_SSLV2;
 $proxy->clear();
 $proxy->filter(\&add_sslv2_filter);
 $proxy->serverflags("-tls1_2");
-$proxy->clientflags("-no_tls1_3");
+$proxy->clientflags("-no_tls1_3 -legacy_renegotiation");
 $proxy->ciphers("AES128-SHA:\@SECLEVEL=0");
 $proxy->start();
 ok(TLSProxy::Message->success(), "TLSv1.2 in SSLv2 ClientHello test");