openssl/test/ssl_test.tmpl
Emilia Kasper b02929802c 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>
2016-06-13 18:31:33 +02:00

37 lines
934 B
Cheetah

[{-$testname-}]
ssl_conf = {-$testname-}-ssl
[{-$testname-}-ssl]
server = {-$testname-}-server{-
# The server2 section is optional.
$OUT = "";
if (%server2) {
$OUT .= "\nserver2 = $testname-server2";
}
-}
client = {-$testname-}-client
[{-$testname-}-server]
{-
foreach my $key (sort keys %server) {
$OUT .= qq{$key} . " = " . qq{$server{$key}\n} if defined $server{$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) {
$OUT .= qq{$key} ." = " . qq{$test{$key}\n} if defined $test{$key};
}
-}