diff options
author | Matt Caswell <matt@openssl.org> | 2017-04-24 11:03:11 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-04-25 11:13:39 +0100 |
commit | cf1560092316c7d2318c5783192781d4e2d41277 (patch) | |
tree | 843dbdd1c9ece4ffb08a764bcecefc89f32d6470 /test/ssl-tests | |
parent | 00da4f4dd9d02c8e0d0d499ba7a0d29e7c1989a4 (diff) |
Add SCTP testing for 11-dtls_resumption.conf
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3286)
Diffstat (limited to 'test/ssl-tests')
-rw-r--r-- | test/ssl-tests/protocol_version.pm | 85 |
1 files changed, 45 insertions, 40 deletions
diff --git a/test/ssl-tests/protocol_version.pm b/test/ssl-tests/protocol_version.pm index ceb5ae0ecc..f0b3030342 100644 --- a/test/ssl-tests/protocol_version.pm +++ b/test/ssl-tests/protocol_version.pm @@ -163,46 +163,51 @@ sub generate_resumption_tests { $resumption_expected = "No"; } - foreach my $ticket ("SessionTicket", "-SessionTicket") { - # Client is flexible, server upgrades/downgrades. - push @server_tests, { - "name" => "resumption", - "client" => { }, - "server" => { - "MinProtocol" => $protocols[$original_protocol], - "MaxProtocol" => $protocols[$original_protocol], - "Options" => $ticket, - }, - "resume_server" => { - "MaxProtocol" => $protocols[$resume_protocol], - }, - "test" => { - "ExpectedProtocol" => $protocols[$resume_protocol], - "Method" => $method, - "HandshakeMode" => "Resume", - "ResumptionExpected" => $resumption_expected, - } - }; - # Server is flexible, client upgrades/downgrades. - push @client_tests, { - "name" => "resumption", - "client" => { - "MinProtocol" => $protocols[$original_protocol], - "MaxProtocol" => $protocols[$original_protocol], - }, - "server" => { - "Options" => $ticket, - }, - "resume_client" => { - "MaxProtocol" => $protocols[$resume_protocol], - }, - "test" => { - "ExpectedProtocol" => $protocols[$resume_protocol], - "Method" => $method, - "HandshakeMode" => "Resume", - "ResumptionExpected" => $resumption_expected, - } - }; + for (my $sctp = 0; $sctp < ($dtls && !disabled("sctp") ? 2 : 1); + $sctp++) { + foreach my $ticket ("SessionTicket", "-SessionTicket") { + # Client is flexible, server upgrades/downgrades. + push @server_tests, { + "name" => "resumption", + "client" => { }, + "server" => { + "MinProtocol" => $protocols[$original_protocol], + "MaxProtocol" => $protocols[$original_protocol], + "Options" => $ticket, + }, + "resume_server" => { + "MaxProtocol" => $protocols[$resume_protocol], + }, + "test" => { + "ExpectedProtocol" => $protocols[$resume_protocol], + "Method" => $method, + "HandshakeMode" => "Resume", + "ResumptionExpected" => $resumption_expected, + } + }; + $server_tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp; + # Server is flexible, client upgrades/downgrades. + push @client_tests, { + "name" => "resumption", + "client" => { + "MinProtocol" => $protocols[$original_protocol], + "MaxProtocol" => $protocols[$original_protocol], + }, + "server" => { + "Options" => $ticket, + }, + "resume_client" => { + "MaxProtocol" => $protocols[$resume_protocol], + }, + "test" => { + "ExpectedProtocol" => $protocols[$resume_protocol], + "Method" => $method, + "HandshakeMode" => "Resume", + "ResumptionExpected" => $resumption_expected, + } + }; + $client_tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp; + } } } } |