Fix test_sslversions to know that TLSv1.3 sets record version to TLSv1.0
authorMatt Caswell <matt@openssl.org>
Mon, 2 Jan 2017 11:52:57 +0000 (11:52 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 10 Jan 2017 23:02:50 +0000 (23:02 +0000)
This also acts as a test for the bug fixed in the previous commit.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2157)

test/recipes/70-test_sslversions.t

index d2e6eb6..ff4eac8 100755 (executable)
@@ -87,7 +87,8 @@ $testtype = REVERSE_ORDER_VERSIONS;
 $proxy->start();
 $record = pop @{$proxy->record_list};
 ok(TLSProxy::Message->success()
 $proxy->start();
 $record = pop @{$proxy->record_list};
 ok(TLSProxy::Message->success()
-   && $record->version() == TLSProxy::Record::VERS_TLS_1_3,
+   && $record->version() == TLSProxy::Record::VERS_TLS_1_0
+   && TLSProxy::Proxy->is_tls13(),
    "Reverse order versions");
 
 #Test 6: no TLSv1.3 or TLSv1.2 version in supported versions extension, but
    "Reverse order versions");
 
 #Test 6: no TLSv1.3 or TLSv1.2 version in supported versions extension, but
@@ -106,7 +107,8 @@ $testtype = WITH_TLS1_4;
 $proxy->start();
 $record = pop @{$proxy->record_list};
 ok(TLSProxy::Message->success()
 $proxy->start();
 $record = pop @{$proxy->record_list};
 ok(TLSProxy::Message->success()
-   && $record->version() == TLSProxy::Record::VERS_TLS_1_3,
+   && $record->version() == TLSProxy::Record::VERS_TLS_1_0
+   && TLSProxy::Proxy->is_tls13(),
    "TLS1.4 in supported versions extension");
 
 sub modify_supported_versions_filter
    "TLS1.4 in supported versions extension");
 
 sub modify_supported_versions_filter