1CTLOG_NEW(3)                        OpenSSL                       CTLOG_NEW(3)
2
3
4

NAME

6       CTLOG_new, CTLOG_new_from_base64, CTLOG_free, CTLOG_get0_name,
7       CTLOG_get0_log_id, CTLOG_get0_public_key - encapsulates information
8       about a Certificate Transparency log
9

SYNOPSIS

11        #include <openssl/ct.h>
12
13        CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
14        int CTLOG_new_from_base64(CTLOG ** ct_log,
15                                  const char *pkey_base64, const char *name);
16        void CTLOG_free(CTLOG *log);
17        const char *CTLOG_get0_name(const CTLOG *log);
18        void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
19                               size_t *log_id_len);
20        EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
21

DESCRIPTION

23       CTLOG_new() returns a new CTLOG that represents the Certificate
24       Transparency (CT) log with the given public key. A name must also be
25       provided that can be used to help users identify this log. Ownership of
26       the public key is transferred.
27
28       CTLOG_new_from_base64() also creates a new CTLOG, but takes the public
29       key in base64-encoded DER form and sets the ct_log pointer to point to
30       the new CTLOG.  The base64 will be decoded and the public key parsed.
31
32       Regardless of whether CTLOG_new() or CTLOG_new_from_base64() is used,
33       it is the caller's responsibility to pass the CTLOG to CTLOG_free()
34       once it is no longer needed. This will delete it and, if created by
35       CTLOG_new(), the EVP_PKEY that was passed to it.
36
37       CTLOG_get0_name() returns the name of the log, as provided when the
38       CTLOG was created. Ownership of the string remains with the CTLOG.
39
40       CTLOG_get0_log_id() sets *log_id to point to a string containing that
41       log's LogID (see RFC 6962). It sets *log_id_len to the length of that
42       LogID. For a v1 CT log, the LogID will be a SHA-256 hash (i.e. 32 bytes
43       long). Ownership of the string remains with the CTLOG.
44
45       CTLOG_get0_public_key() returns the public key of the CT log. Ownership
46       of the EVP_PKEY remains with the CTLOG.
47

RETURN VALUES

49       CTLOG_new() will return NULL if an error occurs.
50
51       CTLOG_new_from_base64() will return 1 on success, 0 otherwise.
52

SEE ALSO

54       ct(7)
55

HISTORY

57       These functions were added in OpenSSL 1.1.0.
58
60       Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
61
62       Licensed under the OpenSSL license (the "License").  You may not use
63       this file except in compliance with the License.  You can obtain a copy
64       in the file LICENSE in the source distribution or at
65       <https://www.openssl.org/source/license.html>.
66
67
68
691.1.1i                            2021-01-26                      CTLOG_NEW(3)
Impressum