Lines Matching defs:fixture
112 SSL_TEST_CTX_TEST_FIXTURE *fixture;
114 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
116 fixture->test_case_name = test_case_name;
117 if (!TEST_ptr(fixture->expected_ctx = SSL_TEST_CTX_new(NULL))) {
118 OPENSSL_free(fixture);
121 return fixture;
124 static int execute_test(SSL_TEST_CTX_TEST_FIXTURE *fixture)
129 if (!TEST_ptr(ctx = SSL_TEST_CTX_create(conf, fixture->test_section,
130 fixture->expected_ctx->libctx))
131 || !testctx_eq(ctx, fixture->expected_ctx))
140 static void tear_down(SSL_TEST_CTX_TEST_FIXTURE *fixture)
142 SSL_TEST_CTX_free(fixture->expected_ctx);
143 OPENSSL_free(fixture);
154 fixture->test_section = "ssltest_default";
155 fixture->expected_ctx->expected_result = SSL_TEST_SUCCESS;
163 fixture->test_section = "ssltest_good";
164 fixture->expected_ctx->method = SSL_TEST_METHOD_DTLS;
165 fixture->expected_ctx->handshake_mode = SSL_TEST_HANDSHAKE_RESUME;
166 fixture->expected_ctx->app_data_size = 1024;
167 fixture->expected_ctx->max_fragment_size = 2048;
169 fixture->expected_ctx->expected_result = SSL_TEST_SERVER_FAIL;
170 fixture->expected_ctx->expected_client_alert = SSL_AD_UNKNOWN_CA;
171 fixture->expected_ctx->expected_server_alert = 0; /* No alert. */
172 fixture->expected_ctx->expected_protocol = TLS1_1_VERSION;
173 fixture->expected_ctx->expected_servername = SSL_TEST_SERVERNAME_SERVER2;
174 fixture->expected_ctx->session_ticket_expected = SSL_TEST_SESSION_TICKET_YES;
175 fixture->expected_ctx->compression_expected = SSL_TEST_COMPRESSION_NO;
176 fixture->expected_ctx->session_id_expected = SSL_TEST_SESSION_ID_IGNORE;
177 fixture->expected_ctx->resumption_expected = 1;
179 fixture->expected_ctx->extra.client.verify_callback =
181 fixture->expected_ctx->extra.client.servername = SSL_TEST_SERVERNAME_SERVER2;
182 fixture->expected_ctx->extra.client.npn_protocols =
184 if (!TEST_ptr(fixture->expected_ctx->extra.client.npn_protocols))
186 fixture->expected_ctx->extra.client.max_fragment_len_mode = 0;
188 fixture->expected_ctx->extra.server.servername_callback =
190 fixture->expected_ctx->extra.server.broken_session_ticket = 1;
192 fixture->expected_ctx->resume_extra.server2.alpn_protocols =
194 if (!TEST_ptr(fixture->expected_ctx->resume_extra.server2.alpn_protocols))
197 fixture->expected_ctx->resume_extra.client.ct_validation =
204 tear_down(fixture);