static int execute_test(SSL_TEST_FIXTURE fixture)
{
- /* TODO(emilia): this is confusing. Flip to return 1 on success. */
- int ret = 1;
+ int ret = 0;
SSL_CTX *server_ctx = NULL, *client_ctx = NULL;
SSL_TEST_CTX *test_ctx = NULL;
HANDSHAKE_RESULT result;
result = do_handshake(server_ctx, client_ctx);
- if (check_test(result, test_ctx))
- ret = 0;
+ ret = check_test(result, test_ctx);
err:
CONF_modules_unload(0);
SSL_CTX_free(server_ctx);
SSL_CTX_free(client_ctx);
SSL_TEST_CTX_free(test_ctx);
- if (ret != 0)
+ if (ret != 1)
ERR_print_errors_fp(stderr);
return ret;
}
static int test_handshake(int idx)
{
SETUP_SSL_TEST_FIXTURE();
- snprintf(fixture.test_app, sizeof(fixture.test_app),
- "test-%d", idx);
+ BIO_snprintf(fixture.test_app, sizeof(fixture.test_app),
+ "test-%d", idx);
EXECUTE_SSL_TEST();
}
ADD_ALL_TESTS(test_handshake, (int)(num_tests));
result = run_tests(argv[0]);
- CONF_modules_free();
return result;
}