Lines Matching defs:fixture
31 static void tear_down(CIPHERLIST_TEST_FIXTURE *fixture)
33 if (fixture != NULL) {
34 SSL_CTX_free(fixture->server);
35 SSL_CTX_free(fixture->client);
36 fixture->server = fixture->client = NULL;
37 OPENSSL_free(fixture);
43 CIPHERLIST_TEST_FIXTURE *fixture;
45 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
47 fixture->test_case_name = test_case_name;
48 if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49 || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
50 tear_down(fixture);
53 return fixture;
184 static int execute_test(CIPHERLIST_TEST_FIXTURE *fixture)
186 return fixture != NULL
187 && test_default_cipherlist(fixture->server)
188 && test_default_cipherlist(fixture->client);
207 if (!TEST_true(SSL_CTX_set_cipher_list(fixture->server, "DEFAULT"))
208 || !TEST_true(SSL_CTX_set_cipher_list(fixture->client, "DEFAULT"))) {
209 tear_down(fixture);
210 fixture = NULL;
222 if (!TEST_int_eq(SSL_CTX_set_cipher_list(fixture->server, "no-such"), 0))
228 s = SSL_new(fixture->client);
243 tear_down(fixture);