summaryrefslogtreecommitdiffstats
path: root/test/ssl_test.tmpl
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-06-13 17:46:12 +0200
committerEmilia Kasper <emilia@openssl.org>2016-06-13 18:31:33 +0200
commitb02929802c1fc47daf268ec208ee113dcce3ed32 (patch)
tree6bf4fae4fd03c5bffffe9b94167416b0b66302ca /test/ssl_test.tmpl
parent25b9d11c002e5c71840c2a6733c5009d78f2c9db (diff)
SSL test: only write out server2 when testing SNI
The SNI tests introduced a redundant "server2" section into every test configuration. Copy this automatically from "server" unless testing SNI, to reduce noise in the generated confs. Also remove duplicate SSL_TEST_CTX_create (merge conflict error). Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/ssl_test.tmpl')
-rw-r--r--test/ssl_test.tmpl22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/ssl_test.tmpl b/test/ssl_test.tmpl
index d4c0c87616..6a5333e9f4 100644
--- a/test/ssl_test.tmpl
+++ b/test/ssl_test.tmpl
@@ -2,8 +2,13 @@
ssl_conf = {-$testname-}-ssl
[{-$testname-}-ssl]
-server = {-$testname-}-server
-server2 = {-$testname-}-server2
+server = {-$testname-}-server{-
+ # The server2 section is optional.
+ $OUT = "";
+ if (%server2) {
+ $OUT .= "\nserver2 = $testname-server2";
+ }
+-}
client = {-$testname-}-client
[{-$testname-}-server]
@@ -11,22 +16,19 @@ client = {-$testname-}-client
foreach my $key (sort keys %server) {
$OUT .= qq{$key} . " = " . qq{$server{$key}\n} if defined $server{$key};
}
--}
-
-[{-$testname-}-server2]
-{-
- foreach my $key (sort keys %server2) {
- $OUT .= qq{$key} . " = " . qq{$server2{$key}\n} if defined $server2{$key};
+ if (%server2) {
+ $OUT .= "\n[$testname-server2]\n";
+ foreach my $key (sort keys %server2) {
+ $OUT .= qq{$key} . " = " . qq{$server2{$key}\n} if defined $server2{$key};
+ }
}
-}
-
[{-$testname-}-client]
{-
foreach my $key (sort keys %client) {
$OUT .= qq{$key} . " = " . qq{$client{$key}\n} if defined $client{$key};
}
-}
-
[test-{-$idx-}]
{-
foreach my $key (sort keys %test) {