1CTLOG_STORE_NEW(3ossl)              OpenSSL             CTLOG_STORE_NEW(3ossl)
2
3
4

NAME

6       CTLOG_STORE_new_ex, CTLOG_STORE_new, CTLOG_STORE_free,
7       CTLOG_STORE_load_default_file, CTLOG_STORE_load_file - Create and
8       populate a Certificate Transparency log list
9

SYNOPSIS

11        #include <openssl/ct.h>
12
13        CTLOG_STORE *CTLOG_STORE_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
14        CTLOG_STORE *CTLOG_STORE_new(void);
15        void CTLOG_STORE_free(CTLOG_STORE *store);
16
17        int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
18        int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
19

DESCRIPTION

21       A CTLOG_STORE is a container for a list of CTLOGs (Certificate
22       Transparency logs). The list can be loaded from one or more files and
23       then searched by LogID (see RFC 6962, Section 3.2, for the definition
24       of a LogID).
25
26       CTLOG_STORE_new_ex() creates an empty list of CT logs associated with
27       the library context libctx and the property query string propq.
28
29       CTLOG_STORE_new() does the same thing as CTLOG_STORE_new_ex() but with
30       the default library context and property query string.
31
32       The CTLOG_STORE is then populated by CTLOG_STORE_load_default_file() or
33       CTLOG_STORE_load_file(). CTLOG_STORE_load_default_file() loads from the
34       default file, which is named ct_log_list.cnf in OPENSSLDIR (see the
35       output of openssl-version(1)). This can be overridden using an
36       environment variable named CTLOG_FILE. CTLOG_STORE_load_file() loads
37       from a caller-specified file path instead. Both of these functions
38       append any loaded CT logs to the CTLOG_STORE.
39
40       The expected format of the file is:
41
42        enabled_logs=foo,bar
43
44        [foo]
45        description = Log 1
46        key = <base64-encoded DER SubjectPublicKeyInfo here>
47
48        [bar]
49        description = Log 2
50        key = <base64-encoded DER SubjectPublicKeyInfo here>
51
52       Once a CTLOG_STORE is no longer required, it should be passed to
53       CTLOG_STORE_free(). This will delete all of the CTLOGs stored within,
54       along with the CTLOG_STORE itself.
55

NOTES

57       If there are any invalid CT logs in a file, they are skipped and the
58       remaining valid logs will still be added to the CTLOG_STORE. A CT log
59       will be considered invalid if it is missing a "key" or "description"
60       field.
61

RETURN VALUES

63       Both CTLOG_STORE_load_default_file and CTLOG_STORE_load_file return 1
64       if all CT logs in the file are successfully parsed and loaded, 0
65       otherwise.
66

SEE ALSO

68       ct(7), CTLOG_STORE_get0_log_by_id(3), SSL_CTX_set_ctlog_list_file(3)
69

HISTORY

71       CTLOG_STORE_new_ex was added in OpenSSL 3.0. All other functions were
72       added in OpenSSL 1.1.0.
73
75       Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
76
77       Licensed under the Apache License 2.0 (the "License").  You may not use
78       this file except in compliance with the License.  You can obtain a copy
79       in the file LICENSE in the source distribution or at
80       <https://www.openssl.org/source/license.html>.
81
82
83
843.0.5                             2022-07-05            CTLOG_STORE_NEW(3ossl)
Impressum