Both of these functions can easily be implemented by callers instead.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
}
}
-int SCT_LIST_set_source(const STACK_OF(SCT) *scts, sct_source_t source)
-{
- int i, ret = 0;
-
- for (i = 0; i < sk_SCT_num(scts); ++i) {
- if (SCT_set_source(sk_SCT_value(scts, i), source))
- ++ret;
- }
-
- return ret;
-}
-
const CTLOG *SCT_get0_log(const SCT *sct)
{
return sct->log;
return sct->log != NULL;
}
-int SCT_LIST_set0_logs(STACK_OF(SCT) *sct_list, const CTLOG_STORE *ct_logs)
-{
- int sct_logs_found = 0;
- int i;
-
- for (i = 0; i < sk_SCT_num(sct_list); ++i) {
- SCT *sct = sk_SCT_value(sct_list, i);
-
- if (sct->log == NULL)
- SCT_set0_log(sct, ct_logs);
- if (sct->log != NULL)
- ++sct_logs_found;
- }
-
- return sct_logs_found;
-}
-
sct_validation_status_t SCT_get_validation_status(const SCT *sct)
{
return sct->validation_status;
*/
__owur int SCT_set_source(SCT *sct, sct_source_t source);
-/*
- * Sets the source of all of the SCTs to the same value.
- * Returns the number of SCTs whose source was set successfully.
- */
-__owur int SCT_LIST_set_source(const STACK_OF(SCT) *scts, sct_source_t source);
-
/*
* Gets information about the log the SCT came from, if set.
*/
*/
int SCT_set0_log(SCT *sct, const CTLOG_STORE* ct_logs);
-/*
- * Looks up information about the logs the SCTs came from using a CT log store.
- * Returns the number of SCTs that now have a log set.
- * If any SCTs already have a log set, they will be skipped.
- */
-int SCT_LIST_set0_logs(STACK_OF(SCT) *sct_list, const CTLOG_STORE *ct_logs);
-
/*
* Pretty-prints an |sct| to |out|.
* It will be indented by the number of spaces specified by |indent|.
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);
} 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);
CMS_sign 1261 1_1_0 EXIST::FUNCTION:CMS
X509_STORE_add_cert 1262 1_1_0 EXIST::FUNCTION:
EC_GROUP_precompute_mult 1263 1_1_0 EXIST::FUNCTION:EC
-SCT_LIST_set_source 1264 1_1_0 EXIST::FUNCTION:
+SCT_LIST_set_source 1264 1_1_0 NOEXIST::FUNCTION:
d2i_DISPLAYTEXT 1265 1_1_0 EXIST::FUNCTION:
HMAC_CTX_copy 1266 1_1_0 EXIST::FUNCTION:
CRYPTO_gcm128_init 1267 1_1_0 EXIST::FUNCTION:
CONF_imodule_set_usr_data 1580 1_1_0 EXIST::FUNCTION:
d2i_TS_RESP_fp 1581 1_1_0 EXIST::FUNCTION:STDIO
X509_policy_tree_get0_user_policies 1582 1_1_0 EXIST::FUNCTION:
-SCT_LIST_set0_logs 1583 1_1_0 EXIST::FUNCTION:
+SCT_LIST_set0_logs 1583 1_1_0 NOEXIST::FUNCTION:
DSA_do_sign 1584 1_1_0 EXIST::FUNCTION:DSA
EVP_CIPHER_CTX_reset 1585 1_1_0 EXIST::FUNCTION:
OCSP_REVOKEDINFO_new 1586 1_1_0 EXIST::FUNCTION: