From 14db9bbd710ac8aaaee89280e9b5ffb5afedb712 Mon Sep 17 00:00:00 2001 From: Rob Percival Date: Tue, 8 Mar 2016 19:09:06 +0000 Subject: Removes SCT_LIST_set_source and SCT_LIST_set0_logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both of these functions can easily be implemented by callers instead. Reviewed-by: Emilia Käsper Reviewed-by: Rich Salz --- test/ct_test.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'test/ct_test.c') diff --git a/test/ct_test.c b/test/ct_test.c index 190a98fa02..2e58419e7f 100644 --- a/test/ct_test.c +++ b/test/ct_test.c @@ -340,12 +340,18 @@ static int execute_cert_test(CT_TEST_FIXTURE fixture) if (fixture.test_validity) { int are_scts_validated = 0; + int i; + scts = X509V3_EXT_d2i(sct_extension); - if (SCT_LIST_set_source(scts, SCT_SOURCE_X509V3_EXTENSION) != - sk_SCT_num(scts)) { - fprintf(stderr, - "Error setting SCT source to X509v3 extension\n"); - test_failed = 1; + for (i = 0; i < sk_SCT_num(scts); ++i) { + SCT *sct_i = sk_SCT_value(scts, i); + + if (!SCT_set_source(sct_i, SCT_SOURCE_X509V3_EXTENSION)) { + fprintf(stderr, + "Error setting SCT source to X509v3 extension\n"); + test_failed = 1; + goto end; + } } are_scts_validated = SCT_LIST_validate(scts, ct_policy_ctx); @@ -355,7 +361,6 @@ static int execute_cert_test(CT_TEST_FIXTURE fixture) } else if (!are_scts_validated) { int invalid_sct_count = 0; int valid_sct_count = 0; - int i; for (i = 0; i < sk_SCT_num(scts); ++i) { SCT *sct_i = sk_SCT_value(scts, i); -- cgit v1.2.1