Debian Codegraph @

upstream/debian-unstable/man3/OSSL_CMP_ITAV_new_caCerts.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 "OSSL_CMP_ITAV_NEW_CACERTS 3SSL"
58 .TH OSSL_CMP_ITAV_NEW_CACERTS 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 OSSL_CMP_ITAV_new_caCerts,
65 OSSL_CMP_ITAV_get0_caCerts,
66 OSSL_CMP_ITAV_new_rootCaCert,
67 OSSL_CMP_ITAV_get0_rootCaCert,
68 OSSL_CMP_ITAV_new_rootCaKeyUpdate,
69 OSSL_CMP_ITAV_get0_rootCaKeyUpdate,
70 OSSL_CMP_CRLSTATUS_new1,
71 OSSL_CMP_CRLSTATUS_create,
72 OSSL_CMP_CRLSTATUS_get0,
73 OSSL_CMP_ITAV_new0_crlStatusList,
74 OSSL_CMP_ITAV_get0_crlStatusList,
75 OSSL_CMP_ITAV_new_crls,
76 OSSL_CMP_ITAV_get0_crls,
77 OSSL_CMP_ITAV_new0_certReqTemplate,
78 OSSL_CMP_ITAV_get1_certReqTemplate
79 \&\- CMP utility functions for handling specific genm and genp messages
80 .SH SYNOPSIS
81 .IX Header "SYNOPSIS"
82 .Vb 1
83 \& #include <openssl/cmp.h>
84 \&
85 \& OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
86 \& int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
87 \&
88 \& OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
89 \& int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
90 \& OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
91 \& const X509 *newWithOld,
92 \& const X509 *oldWithNew);
93 \& int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
94 \& X509 **newWithNew,
95 \& X509 **newWithOld,
96 \& X509 **oldWithNew);
97 \&
98 \& OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
99 \& const GENERAL_NAMES *issuer,
100 \& const ASN1_TIME *thisUpdate);
101 \& OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
102 \& const X509 *cert, int only_DN);
103 \& int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
104 \& DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
105 \& ASN1_TIME **thisUpdate);
106 \& OSSL_CMP_ITAV
107 \& *OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
108 \& int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
109 \& STACK_OF(OSSL_CMP_CRLSTATUS) **out);
110 \& OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crl);
111 \& int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *itav, STACK_OF(X509_CRL) **out);
112 \& OSSL_CMP_ITAV
113 \& *OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
114 \& OSSL_CMP_ATAVS *keySpec);
115 \& int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
116 \& OSSL_CRMF_CERTTEMPLATE **certTemplate,
117 \& OSSL_CMP_ATAVS **keySpec);
118 .Ve
119 .SH DESCRIPTION
120 .IX Header "DESCRIPTION"
121 ITAV is short for InfoTypeAndValue.
122 .PP
123 \&\fBOSSL_CMP_ITAV_new_caCerts()\fR creates an \fBOSSL_CMP_ITAV\fR structure of type
124 \&\fBcaCerts\fR and fills it with a copy of the provided list of certificates.
125 The \fIcaCerts\fR argument may be NULL or contain any number of certificates.
126 .PP
127 \&\fBOSSL_CMP_ITAV_get0_caCerts()\fR requires that \fIitav\fR has type \fBcaCerts\fR.
128 It assigns NULL to \fI*out\fR if there are no CA certificates in \fIitav\fR, otherwise
129 the internal pointer of type \fBSTACK_OF(X509)\fR with the certificates present.
130 .PP
131 \&\fBOSSL_CMP_ITAV_new_rootCaCert()\fR creates a new \fBOSSL_CMP_ITAV\fR structure
132 of type \fBrootCaCert\fR that includes the optionally given certificate.
133 .PP
134 \&\fBOSSL_CMP_ITAV_get0_rootCaCert()\fR requires that \fIitav\fR has type \fBrootCaCert\fR.
135 It assigns NULL to \fI*out\fR if no certificate is included in \fIitav\fR, otherwise
136 the internal pointer to the certificate contained in the infoValue field.
137 .PP
138 \&\fBOSSL_CMP_ITAV_new_rootCaKeyUpdate()\fR creates a new \fBOSSL_CMP_ITAV\fR structure
139 of type \fBrootCaKeyUpdate\fR that includes an RootCaKeyUpdateContent structure
140 with the optional \fInewWithNew\fR, \fInewWithOld\fR, and \fIoldWithNew\fR certificates.
141 An RootCaKeyUpdateContent structure is included only if \fInewWithNew\fR
142 is not NULL.
143 .PP
144 \&\fBOSSL_CMP_ITAV_get0_rootCaKeyUpdate()\fR requires that \fIitav\fR has infoType
145 \&\fBrootCaKeyUpdate\fR.
146 If an update of a root CA certificate is included,
147 it assigns to \fI*newWithNew\fR the internal pointer
148 to the certificate contained in the newWithNew infoValue sub-field of \fIitav\fR.
149 If \fInewWithOld\fR is not NULL, it assigns to \fI*newWithOld\fR the internal pointer
150 to the certificate contained in the newWithOld infoValue sub-field of \fIitav\fR.
151 If \fIoldWithNew\fR is not NULL, it assigns to \fI*oldWithNew\fR the internal pointer
152 to the certificate contained in the oldWithNew infoValue sub-field of \fIitav\fR.
153 Each of these pointers will be set to NULL if no root CA certificate update
154 is present or the respective sub-field is not included.
155 .PP
156 \&\fBOSSL_CMP_CRLSTATUS_new1()\fR allocates a new \fBOSSL_CMP_CRLSTATUS\fR structure
157 that contains either a copy of the distribution point name \fIdpn\fR
158 or a copy of the certificate issuer \fIissuer\fR, while giving both is an error.
159 If given, a copy of the CRL issuance time \fIthisUpdate\fR is also included.
160 .PP
161 \&\fBOSSL_CMP_CRLSTATUS_create()\fR is a high-level variant of \fBOSSL_CMP_CRLSTATUS_new1()\fR.
162 It fills the thisUpdate field with a copy of the thisUpdate field of \fIcrl\fR if present.
163 It fills the CRLSource field with a copy of the first data item found using the \fIcrl\fR
164 and/or \fIcert\fR parameters as follows.
165 Any available distribution point name is preferred over issuer names.
166 Data from \fIcert\fR, if present, is preferred over data from \fIcrl\fR.
167 If no distribution point names are available,
168 candidate issuer names are taken from following sources, as far as present:
169 .IP "the list of distribution points in the first cRLDistributionPoints extension of \fIcert\fR," 4
170 .IX Item "the list of distribution points in the first cRLDistributionPoints extension of cert,"
171 .PD 0
172 .IP "the issuer field of the authority key identifier of \fIcert\fR," 4
173 .IX Item "the issuer field of the authority key identifier of cert,"
174 .IP "the issuer DN of \fIcert\fR," 4
175 .IX Item "the issuer DN of cert,"
176 .IP "the issuer field of the authority key identifier of \fIcrl\fR, and" 4
177 .IX Item "the issuer field of the authority key identifier of crl, and"
178 .IP "the issuer DN of \fIcrl\fR." 4
179 .IX Item "the issuer DN of crl."
180 .PD
181 .PP
182 If <only_DN> is set, a candidate issuer name of type \fBGENERAL_NAMES\fR is
183 accepted only if it contains exactly one general name of type directoryName.
184 .PP
185 \&\fBOSSL_CMP_CRLSTATUS_get0()\fR reads the fields of \fIcrlstatus\fR
186 and assigns them to \fI*dpn\fR, \fI*issuer\fR, and \fI*thisUpdate\fR.
187 \&\fI*thisUpdate\fR is assigned only if the \fIthisUpdate\fR argument is not NULL.
188 Depending on the choice present, either \fI*dpn\fR or \fI*issuer\fR will be NULL.
189 \&\fI*thisUpdate\fR can also be NULL if the field is not present.
190 .PP
191 \&\fBOSSL_CMP_ITAV_new0_crlStatusList()\fR creates a new \fBOSSL_CMP_ITAV\fR structure of
192 type \fBcrlStatusList\fR that includes the optionally given list of
193 CRL status data, each of which is of type \fBOSSL_CMP_CRLSTATUS\fR.
194 .PP
195 \&\fBOSSL_CMP_ITAV_get0_crlStatusList()\fR on success assigns to \fI*out\fR an internal
196 pointer to the list of CRL status data in the infoValue field of \fIitav\fR.
197 The pointer may be NULL if no CRL status data is included.
198 It is an error if the infoType of \fIitav\fR is not \fBcrlStatusList\fR.
199 .PP
200 \&\fBOSSL_CMP_ITAV_new_crls()\fR creates a new \fBOSSL_CMP_ITAV\fR structure
201 of type \fBcrls\fR including an empty list of CRLs if the \fIcrl\fR argument is NULL
202 or including a singleton list a with copy of the provided CRL otherwise.
203 .PP
204 \&\fBOSSL_CMP_ITAV_get0_crls()\fR on success assigns to \fI*out\fR an internal pointer to
205 the list of CRLs contained in the infoValue field of \fIitav\fR.
206 The pointer may be NULL if no CRL is included.
207 It is an error if the infoType of \fIitav\fR is not \fBcrls\fR.
208 .PP
209 \&\fBOSSL_CMP_ITAV_new0_certReqTemplate()\fR creates an \fBOSSL_CMP_ITAV\fR structure
210 of type \fBcertReqTemplate\fR.
211 If \fIcertTemplate\fR is NULL then also \fIkeySpec\fR must be NULL,
212 and the resulting ITAV can be used in a \fBgenm\fR message to obtain the
213 requirements a PKI has on the certificate template used to request certificates,
214 or in a \fBgenp\fR message stating that there are no such requirements.
215 Otherwise the resulting ITAV includes a CertReqTemplateValue structure
216 with \fIcertTemplate\fR of type \fBOSSL_CRMF_CERTTEMPLATE\fR and an optional list
217 of key specifications \fIkeySpec\fR, each being of type \fBOSSL_CMP_ATAV\fR, and
218 the resulting ATAV can be used in a \fBgenp\fR message to provide requirements.
219 .PP
220 \&\fBOSSL_CMP_ITAV_get1_certReqTemplate()\fR
221 requires that \fIitav\fR has type \fBcertReqTemplate\fR.
222 If assigns NULL to \fI*certTemplate\fR if no \fBOSSL_CRMF_CERTTEMPLATE\fR structure
223 with a certificate template value is in \fIitav\fR,
224 otherwise a copy of the certTemplate field value.
225 If \fIkeySpec\fR is not NULL, it is assigned NULL
226 if the structure is not present in \fIitav\fR or the keySpec field is absent.
227 Otherwise, the function checks that all elements of keySpec field are of type
228 \&\fBalgId\fR or \fBrsaKeyLen\fR and assigns to \fI*keySpec\fR a copy of the keySpec field.
229 .SH NOTES
230 .IX Header "NOTES"
231 CMP is defined in RFC 9810.
232 .SH "RETURN VALUES"
233 .IX Header "RETURN VALUES"
234 \&\fBOSSL_CMP_ITAV_new_caCerts()\fR, \fBOSSL_CMP_ITAV_new_rootCaCert()\fR,
235 \&\fBOSSL_CMP_ITAV_new_rootCaKeyUpdate()\fR, \fBOSSL_CMP_CRLSTATUS_new1()\fR,
236 \&\fBOSSL_CMP_CRLSTATUS_create()\fR, \fBOSSL_CMP_ITAV_new0_crlStatusList()\fR,
237 \&\fBOSSL_CMP_ITAV_new_crls()\fR and \fBOSSL_CMP_ITAV_new0_certReqTemplate()\fR
238 return a pointer to the new ITAV structure on success, or NULL on error.
239 .PP
240 \&\fBOSSL_CMP_ITAV_get0_caCerts()\fR, \fBOSSL_CMP_ITAV_get0_rootCaCert()\fR,
241 \&\fBOSSL_CMP_ITAV_get0_rootCaKeyUpdate()\fR, \fBOSSL_CMP_CRLSTATUS_get0()\fR,
242 \&\fBOSSL_CMP_ITAV_get0_crlStatusList()\fR, \fBOSSL_CMP_ITAV_get0_crls()\fR
243 and \fBOSSL_CMP_ITAV_get1_certReqTemplate()\fR
244 return 1 on success, 0 on error.
245 .SH "SEE ALSO"
246 .IX Header "SEE ALSO"
247 \&\fBOSSL_CMP_ITAV_create\fR\|(3) and \fBOSSL_CMP_ITAV_get0_type\fR\|(3)
248 .SH HISTORY
249 .IX Header "HISTORY"
250 \&\fBOSSL_CMP_ITAV_new_caCerts()\fR, \fBOSSL_CMP_ITAV_get0_caCerts()\fR,
251 \&\fBOSSL_CMP_ITAV_new_rootCaCert()\fR, \fBOSSL_CMP_ITAV_get0_rootCaCert()\fR,
252 \&\fBOSSL_CMP_ITAV_new_rootCaKeyUpdate()\fR, and \fBOSSL_CMP_ITAV_get0_rootCaKeyUpdate()\fR
253 were added in OpenSSL 3.2.
254 .PP
255 \&\fBOSSL_CMP_CRLSTATUS_new1()\fR, \fBOSSL_CMP_CRLSTATUS_create()\fR,
256 \&\fBOSSL_CMP_CRLSTATUS_get0()\fR, \fBOSSL_CMP_ITAV_new0_crlStatusList()\fR,
257 \&\fBOSSL_CMP_ITAV_get0_crlStatusList()\fR, \fBOSSL_CMP_ITAV_new_crls()\fR,
258 \&\fBOSSL_CMP_ITAV_get0_crls()\fR, \fBOSSL_CMP_ITAV_new0_certReqTemplate()\fR
259 and \fBOSSL_CMP_ITAV_get1_certReqTemplate()\fR were added in OpenSSL 3.4.
260 .SH COPYRIGHT
261 .IX Header "COPYRIGHT"
262 Copyright 2022\-2025 The OpenSSL Project Authors. All Rights Reserved.
263 .PP
264 Licensed under the Apache License 2.0 (the "License"). You may not use
265 this file except in compliance with the License. You can obtain a copy
266 in the file LICENSE in the source distribution or at
267 <https://www.openssl.org/source/license.html>.