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>
diff --git a/test/ssl_test_ctx_test.conf b/test/ssl_test_ctx_test.conf index eacf58a..73878a1 100644 --- a/test/ssl_test_ctx_test.conf +++ b/test/ssl_test_ctx_test.conf
@@ -1,19 +1,31 @@ [ssltest_default] [ssltest_good] -ExpectedResult = ServerFail -ClientAlert = UnknownCA -Protocol = TLSv1.1 -ClientVerifyCallback = RejectAll -ServerName = server2 -ExpectedServerName = server2 -ServerNameCallback = IgnoreMismatch -SessionTicketExpected = Yes +client = ssltest_good_client_extra +server = ssltest_good_server_extra +resume-server2 = ssltest_good_resume_server2_extra + Method = DTLS -ClientNPNProtocols = foo,bar -Server2ALPNProtocols = baz HandshakeMode = Resume -ResumptionExpected = yes + +ExpectedResult = ServerFail +ExpectedClientAlert = UnknownCA +ExpectedProtocol = TLSv1.1 +ExpectedServerName = server2 +SessionTicketExpected = Yes +ResumptionExpected = Yes + +[ssltest_good_client_extra] +VerifyCallback = RejectAll +ServerName = server2 +NPNProtocols = foo,bar + +[ssltest_good_server_extra] +ServerNameCallback = IgnoreMismatch +BrokenSessionTicket = Yes + +[ssltest_good_resume_server2_extra] +ALPNProtocols = baz [ssltest_unknown_option] UnknownOption = Foo