summaryrefslogtreecommitdiff
path: root/test/generate_ssl_tests.pl
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-07-21 16:29:48 +0200
committerEmilia Kasper <emilia@openssl.org>2016-08-08 12:06:26 +0200
commit9f48bbacd8cac8d08dff146db438ab3e19908a7a (patch)
tree7650dbd3d696d895c53b153a3d2b8c3881bade88 /test/generate_ssl_tests.pl
parenta4a18b2f891c59fd78ad520da79146af13063892 (diff)
downloadopenssl-new-9f48bbacd8cac8d08dff146db438ab3e19908a7a.tar.gz
Reorganize SSL test structures
Move custom server and client options from the test dictionary to an "extra" section of each server/client. Rename test expectations to say "Expected". This is a big but straightforward change. Primarily, this allows us to specify multiple server and client contexts without redefining the custom options for each of them. For example, instead of "ServerNPNProtocols", "Server2NPNProtocols", "ResumeServerNPNProtocols", we now have, "NPNProtocols". This simplifies writing resumption and SNI tests. The first application will be resumption tests for NPN and ALPN. Regrouping the options also makes it clearer which options apply to the server, which apply to the client, which configure the test, and which are test expectations. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/generate_ssl_tests.pl')
-rw-r--r--test/generate_ssl_tests.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/generate_ssl_tests.pl b/test/generate_ssl_tests.pl
index f103e8efb5..fd785b7bc6 100644
--- a/test/generate_ssl_tests.pl
+++ b/test/generate_ssl_tests.pl
@@ -46,7 +46,8 @@ sub print_templates {
if (defined $test->{"server2"}) {
$test->{"server2"} = { (%ssltests::base_server, %{$test->{"server2"}}) };
} else {
- if (defined $test->{"test"}->{"ServerNameCallback"}) {
+ if ($test->{"server"}->{"extra"} &&
+ defined $test->{"server"}->{"extra"}->{"ServerNameCallback"}) {
# Default is the same as server.
$test->{"reuse_server2"} = 1;
}