*/
__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.
*/
-CTLOG *SCT_get0_log(const SCT *sct);
+const CTLOG *SCT_get0_log(const SCT *sct);
/*
* Looks up information about the log the SCT came from using a CT log store.
+ * The CTLOG_STORE must outlive the SCT, as ownership of the CTLOG remains with
+ * the CTLOG_STORE.
* Returns 1 if information about the log is found, 0 otherwise.
* The information can be accessed via SCT_get0_log.
*/
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|.
* Returns < 0 on error, >= 0 indicating bytes written (or would have been)
* on success.
*/
-__owur int i2d_SCT_LIST(STACK_OF(SCT) *a, unsigned char **pp);
+__owur int i2d_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
/*
* Parses an SCT list in DER format and returns it.
* Finds a CT log in the store based on its log ID.
* Returns the CT log, or NULL if no match is found.
*/
-CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
- const uint8_t *log_id,
- size_t log_id_len);
+const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
+ const uint8_t *log_id,
+ size_t log_id_len);
/*
* Loads a CT log list into a |store| from a |file|.