Debian Codegraph @

upstream/debian-unstable/man3/CTLOG_new.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "CTLOG_NEW 3SSL"
58 .TH CTLOG_NEW 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 CTLOG_new_ex, CTLOG_new, CTLOG_new_from_base64,
65 CTLOG_new_from_base64_ex, CTLOG_free,
66 CTLOG_get0_name, CTLOG_get0_log_id, CTLOG_get0_public_key \-
67 encapsulates information about a Certificate Transparency log
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& #include <openssl/ct.h>
72 \&
73 \& CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name,
74 \& OSSL_LIB_CTX *libctx, const char *propq);
75 \& CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
76 \&
77 \& int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64,
78 \& const char *name, OSSL_LIB_CTX *libctx,
79 \& const char *propq);
80 \& int CTLOG_new_from_base64(CTLOG ** ct_log,
81 \& const char *pkey_base64, const char *name);
82 \& void CTLOG_free(CTLOG *log);
83 \& const char *CTLOG_get0_name(const CTLOG *log);
84 \& void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
85 \& size_t *log_id_len);
86 \& EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
87 .Ve
88 .SH DESCRIPTION
89 .IX Header "DESCRIPTION"
90 \&\fBCTLOG_new_ex()\fR returns a new CTLOG that represents the Certificate
91 Transparency (CT) log with the given public key and associates it with the
92 library context \fIlibctx\fR and property query string \fIpropq\fR. A name must also
93 be provided that can be used to help users identify this log. Ownership of the
94 public key is transferred.
95 .PP
96 \&\fBCTLOG_new()\fR does the same thing as \fBCTLOG_new_ex()\fR but with the default
97 library context and the default property query string.
98 .PP
99 \&\fBCTLOG_new_from_base64_ex()\fR also creates a new CTLOG, but takes the
100 public key in base64\-encoded DER form and sets the ct_log pointer to point to
101 the new CTLOG. The base64 will be decoded and the public key parsed. The CTLOG
102 will be associated with the given library context \fIlibctx\fR and property query
103 string \fIpropq\fR.
104 .PP
105 \&\fBCTLOG_new_from_base64()\fR does the same thing as
106 \&\fBCTLOG_new_from_base64_ex()\fR except that the default library context and
107 property query string are used.
108 .PP
109 Regardless of whether \fBCTLOG_new()\fR or \fBCTLOG_new_from_base64()\fR is used, it is the
110 caller's responsibility to pass the CTLOG to \fBCTLOG_free()\fR once it is no longer
111 needed. This will delete it and, if created by \fBCTLOG_new()\fR, the EVP_PKEY that
112 was passed to it. If the argument to \fBCTLOG_free()\fR is NULL, nothing is done.
113 .PP
114 \&\fBCTLOG_get0_name()\fR returns the name of the log, as provided when the CTLOG was
115 created. Ownership of the string remains with the CTLOG.
116 .PP
117 \&\fBCTLOG_get0_log_id()\fR sets *log_id to point to a string containing that log's
118 LogID (see RFC 6962). It sets *log_id_len to the length of that LogID. For a
119 v1 CT log, the LogID will be a SHA\-256 hash (i.e. 32 bytes long). Ownership of
120 the string remains with the CTLOG.
121 .PP
122 \&\fBCTLOG_get0_public_key()\fR returns the public key of the CT log. Ownership of the
123 EVP_PKEY remains with the CTLOG.
124 .SH "RETURN VALUES"
125 .IX Header "RETURN VALUES"
126 \&\fBCTLOG_new()\fR will return NULL if an error occurs.
127 .PP
128 \&\fBCTLOG_new_from_base64()\fR will return 1 on success, 0 otherwise.
129 .SH "SEE ALSO"
130 .IX Header "SEE ALSO"
131 \&\fBct\fR\|(7)
132 .SH HISTORY
133 .IX Header "HISTORY"
134 The functions \fBCTLOG_new_ex()\fR and \fBCTLOG_new_from_base64_ex()\fR
135 were added in OpenSSL 3.0. All other functions were added in OpenSSL 1.1.0.
136 .SH COPYRIGHT
137 .IX Header "COPYRIGHT"
138 Copyright 2016\-2024 The OpenSSL Project Authors. All Rights Reserved.
139 .PP
140 Licensed under the Apache License 2.0 (the "License"). You may not use
141 this file except in compliance with the License. You can obtain a copy
142 in the file LICENSE in the source distribution or at
143 <https://www.openssl.org/source/license.html>.