aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-04-24 10:16:21 +0100
committerMatt Caswell <matt@openssl.org>2017-04-25 11:13:39 +0100
commit00da4f4dd9d02c8e0d0d499ba7a0d29e7c1989a4 (patch)
tree1dccc0ba610adf291b809f28905c1892acdf938e
parent4ef8a6b22b830d89d5f3e2ff0d63c2040a9f0cac (diff)
downloadopenssl-00da4f4dd9d02c8e0d0d499ba7a0d29e7c1989a4.tar.gz
Add SCTP testing to 07-dtls-protocol-version.conf
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3286)
-rw-r--r--test/recipes/80-test_ssl_new.t2
-rw-r--r--test/ssl-tests/protocol_version.pm54
2 files changed, 30 insertions, 26 deletions
diff --git a/test/recipes/80-test_ssl_new.t b/test/recipes/80-test_ssl_new.t
index 3c13b433d0..dac74f404a 100644
--- a/test/recipes/80-test_ssl_new.t
+++ b/test/recipes/80-test_ssl_new.t
@@ -57,7 +57,7 @@ my %conf_dependent_tests = (
"02-protocol-version.conf" => !$is_default_tls,
"04-client_auth.conf" => !$is_default_tls || !$is_default_dtls,
"05-sni.conf" => disabled("tls1_1"),
- "07-dtls-protocol-version.conf" => !$is_default_dtls,
+ "07-dtls-protocol-version.conf" => !$is_default_dtls || !disabled("sctp"),
"10-resumption.conf" => !$is_default_tls,
"11-dtls_resumption.conf" => !$is_default_dtls,
"16-dtls-certstatus.conf" => !$is_default_dtls || !disabled("sctp"),
diff --git a/test/ssl-tests/protocol_version.pm b/test/ssl-tests/protocol_version.pm
index 5da3eda3d9..ceb5ae0ecc 100644
--- a/test/ssl-tests/protocol_version.pm
+++ b/test/ssl-tests/protocol_version.pm
@@ -96,31 +96,35 @@ sub generate_version_tests {
my @tests = ();
- foreach my $c_min (0..$#min_protocols) {
- my $c_max_min = $c_min == 0 ? 0 : $c_min - 1;
- foreach my $c_max ($c_max_min..$#max_protocols) {
- foreach my $s_min (0..$#min_protocols) {
- my $s_max_min = $s_min == 0 ? 0 : $s_min - 1;
- foreach my $s_max ($s_max_min..$#max_protocols) {
- my ($result, $protocol) =
- expected_result($c_min, $c_max, $s_min, $s_max,
- $min_enabled, $max_enabled, \@protocols);
- push @tests, {
- "name" => "version-negotiation",
- "client" => {
- "MinProtocol" => $min_protocols[$c_min],
- "MaxProtocol" => $max_protocols[$c_max],
- },
- "server" => {
- "MinProtocol" => $min_protocols[$s_min],
- "MaxProtocol" => $max_protocols[$s_max],
- },
- "test" => {
- "ExpectedResult" => $result,
- "ExpectedProtocol" => $protocol,
- "Method" => $method,
- }
- };
+ for (my $sctp = 0; $sctp < ($dtls && !disabled("sctp") ? 2 : 1); $sctp++) {
+ foreach my $c_min (0..$#min_protocols) {
+ my $c_max_min = $c_min == 0 ? 0 : $c_min - 1;
+ foreach my $c_max ($c_max_min..$#max_protocols) {
+ foreach my $s_min (0..$#min_protocols) {
+ my $s_max_min = $s_min == 0 ? 0 : $s_min - 1;
+ foreach my $s_max ($s_max_min..$#max_protocols) {
+ my ($result, $protocol) =
+ expected_result($c_min, $c_max, $s_min, $s_max,
+ $min_enabled, $max_enabled,
+ \@protocols);
+ push @tests, {
+ "name" => "version-negotiation",
+ "client" => {
+ "MinProtocol" => $min_protocols[$c_min],
+ "MaxProtocol" => $max_protocols[$c_max],
+ },
+ "server" => {
+ "MinProtocol" => $min_protocols[$s_min],
+ "MaxProtocol" => $max_protocols[$s_max],
+ },
+ "test" => {
+ "ExpectedResult" => $result,
+ "ExpectedProtocol" => $protocol,
+ "Method" => $method,
+ }
+ };
+ $tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
+ }
}
}
}