diff options
author | Matt Caswell <matt@openssl.org> | 2017-04-26 11:43:05 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-04 11:49:20 +0100 |
commit | f315b665715bc499b5b97b18d3a7933c7b81ee5d (patch) | |
tree | cb3cd5b8288d8fe88392883e1274b5f4ee89f56e | |
parent | ae4765396f19f5aa8aeb6565707e8e5ada4f3e6d (diff) |
Add tests for version/ciphersuite sanity checks
The previous commits added sanity checks for where the max enabled protocol
version does not have any configured ciphersuites. We should check that we
fail in those circumstances.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3334)
-rw-r--r-- | test/ssl-tests/protocol_version.pm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/ssl-tests/protocol_version.pm b/test/ssl-tests/protocol_version.pm index ef92275257..07e180e010 100644 --- a/test/ssl-tests/protocol_version.pm +++ b/test/ssl-tests/protocol_version.pm @@ -125,6 +125,37 @@ sub generate_version_tests { } } } + return @tests if disabled("tls1_3") || disabled("tls1_2") || $dtls; + + #Add some version/ciphersuite sanity check tests + push @tests, { + "name" => "ciphersuite-sanity-check-client", + "client" => { + #Offering only <=TLSv1.2 ciphersuites with TLSv1.3 should fail + "CipherString" => "AES128-SHA", + }, + "server" => { + "MaxProtocol" => "TLSv1.2" + }, + "test" => { + "ExpectedResult" => "InternalError", + } + }; + push @tests, { + "name" => "ciphersuite-sanity-check-server", + "client" => { + "CipherString" => "AES128-SHA", + "MaxProtocol" => "TLSv1.2" + }, + "server" => { + #Allowing only <=TLSv1.2 ciphersuites with TLSv1.3 should fail + "CipherString" => "AES128-SHA", + }, + "test" => { + "ExpectedResult" => "ServerFail", + } + }; + return @tests; } |