Lines Matching full:fixture
111 SSL_TEST_CTX_TEST_FIXTURE *fixture; in set_up() local
113 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
115 fixture->test_case_name = test_case_name; in set_up()
116 if (!TEST_ptr(fixture->expected_ctx = SSL_TEST_CTX_new(NULL))) { in set_up()
117 OPENSSL_free(fixture); in set_up()
120 return fixture; in set_up()
123 static int execute_test(SSL_TEST_CTX_TEST_FIXTURE *fixture) in execute_test() argument
128 if (!TEST_ptr(ctx = SSL_TEST_CTX_create(conf, fixture->test_section, in execute_test()
129 fixture->expected_ctx->libctx)) in execute_test()
130 || !testctx_eq(ctx, fixture->expected_ctx)) in execute_test()
139 static void tear_down(SSL_TEST_CTX_TEST_FIXTURE *fixture) in tear_down() argument
141 SSL_TEST_CTX_free(fixture->expected_ctx); in tear_down()
142 OPENSSL_free(fixture); in tear_down()
153 fixture->test_section = "ssltest_default"; in test_empty_configuration()
154 fixture->expected_ctx->expected_result = SSL_TEST_SUCCESS; in test_empty_configuration()
162 fixture->test_section = "ssltest_good"; in test_good_configuration()
163 fixture->expected_ctx->method = SSL_TEST_METHOD_DTLS; in test_good_configuration()
164 fixture->expected_ctx->handshake_mode = SSL_TEST_HANDSHAKE_RESUME; in test_good_configuration()
165 fixture->expected_ctx->app_data_size = 1024; in test_good_configuration()
166 fixture->expected_ctx->max_fragment_size = 2048; in test_good_configuration()
168 fixture->expected_ctx->expected_result = SSL_TEST_SERVER_FAIL; in test_good_configuration()
169 fixture->expected_ctx->expected_client_alert = SSL_AD_UNKNOWN_CA; in test_good_configuration()
170 fixture->expected_ctx->expected_server_alert = 0; /* No alert. */ in test_good_configuration()
171 fixture->expected_ctx->expected_protocol = TLS1_1_VERSION; in test_good_configuration()
172 fixture->expected_ctx->expected_servername = SSL_TEST_SERVERNAME_SERVER2; in test_good_configuration()
173 fixture->expected_ctx->session_ticket_expected = SSL_TEST_SESSION_TICKET_YES; in test_good_configuration()
174 fixture->expected_ctx->compression_expected = SSL_TEST_COMPRESSION_NO; in test_good_configuration()
175 fixture->expected_ctx->session_id_expected = SSL_TEST_SESSION_ID_IGNORE; in test_good_configuration()
176 fixture->expected_ctx->resumption_expected = 1; in test_good_configuration()
178 fixture->expected_ctx->extra.client.verify_callback = SSL_TEST_VERIFY_REJECT_ALL; in test_good_configuration()
179 fixture->expected_ctx->extra.client.servername = SSL_TEST_SERVERNAME_SERVER2; in test_good_configuration()
180 fixture->expected_ctx->extra.client.npn_protocols = OPENSSL_strdup("foo,bar"); in test_good_configuration()
181 if (!TEST_ptr(fixture->expected_ctx->extra.client.npn_protocols)) in test_good_configuration()
183 fixture->expected_ctx->extra.client.max_fragment_len_mode = 0; in test_good_configuration()
185 fixture->expected_ctx->extra.server.servername_callback = SSL_TEST_SERVERNAME_IGNORE_MISMATCH; in test_good_configuration()
186 fixture->expected_ctx->extra.server.broken_session_ticket = 1; in test_good_configuration()
188 fixture->expected_ctx->resume_extra.server2.alpn_protocols = OPENSSL_strdup("baz"); in test_good_configuration()
189 if (!TEST_ptr(fixture->expected_ctx->resume_extra.server2.alpn_protocols)) in test_good_configuration()
192 fixture->expected_ctx->resume_extra.client.ct_validation = SSL_TEST_CT_VALIDATION_STRICT; in test_good_configuration()
198 tear_down(fixture); in test_good_configuration()