5 CTLOG_STORE_new, CTLOG_STORE_free,
6 CTLOG_STORE_load_default_file, CTLOG_STORE_load_file -
7 Create and populate a Certificate Transparency log list
11 #include <openssl/ct.h>
13 CTLOG_STORE *CTLOG_STORE_new(void);
14 void CTLOG_STORE_free(CTLOG_STORE *store);
16 int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
17 int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
21 A CTLOG_STORE is a container for a list of CTLOGs (Certificate Transparency
22 logs). The list can be loaded from one or more files and then searched by LogID
23 (see RFC 6962, Section 3.2, for the definition of a LogID).
25 CTLOG_STORE_new() creates an empty list of CT logs. This is then populated
26 by CTLOG_STORE_load_default_file() or CTLOG_STORE_load_file().
27 CTLOG_STORE_load_default_file() loads from the default file, which is named
28 "ct_log_list.cnf" in OPENSSLDIR (see the output of L<version>). This can be
29 overridden using an environment variable named "CTLOG_FILE".
30 CTLOG_STORE_load_file() loads from a caller-specified file path instead.
31 Both of these functions append any loaded CT logs to the CTLOG_STORE.
33 The expected format of the file is:
39 key = <base64-encoded DER SubjectPublicKeyInfo here>
43 key = <base64-encoded DER SubjectPublicKeyInfo here>
45 Once a CTLOG_STORE is no longer required, it should be passed to
46 CTLOG_STORE_free(). This will delete all of the CTLOGs stored within, along
47 with the CTLOG_STORE itself.
51 If there are any invalid CT logs in a file, they are skipped and the remaining
52 valid logs will still be added to the CTLOG_STORE. A CT log will be considered
53 invalid if it is missing a "key" or "description" field.
57 Both B<CTLOG_STORE_load_default_file> and B<CTLOG_STORE_load_file> return 1 if
58 all CT logs in the file are successfully parsed and loaded, 0 otherwise.
63 L<CTLOG_STORE_get0_log_by_id(3)>,
64 L<SSL_CTX_set_ctlog_list_file(3)>
68 These functions were added in OpenSSL 1.1.0.
72 Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
74 Licensed under the OpenSSL license (the "License"). You may not use
75 this file except in compliance with the License. You can obtain a copy
76 in the file LICENSE in the source distribution or at
77 L<https://www.openssl.org/source/license.html>.