]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/OSSL_CMP_ITAV_new_caCerts.pod
Copyright year updates
[thirdparty/openssl.git] / doc / man3 / OSSL_CMP_ITAV_new_caCerts.pod
CommitLineData
d477484d
DDO
1=pod
2
3=head1 NAME
4
5OSSL_CMP_ITAV_new_caCerts,
01b04851
DDO
6OSSL_CMP_ITAV_get0_caCerts,
7OSSL_CMP_ITAV_new_rootCaCert,
8OSSL_CMP_ITAV_get0_rootCaCert,
9OSSL_CMP_ITAV_new_rootCaKeyUpdate,
10OSSL_CMP_ITAV_get0_rootCaKeyUpdate
d477484d
DDO
11- CMP utility functions for handling specific genm and genp messages
12
13=head1 SYNOPSIS
14
15 #include <openssl/cmp.h>
16
17 OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
18 int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
19
01b04851
DDO
20 OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
21 int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
22 OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
23 const X509 *newWithOld,
24 const X509 *oldWithNew);
25 int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
26 X509 **newWithNew,
27 X509 **newWithOld,
28 X509 **oldWithNew);
29
d477484d
DDO
30=head1 DESCRIPTION
31
32ITAV is short for InfoTypeAndValue.
33
34OSSL_CMP_ITAV_new_caCerts() creates an B<OSSL_CMP_ITAV> structure of type
35B<caCerts> and fills it with a copy of the provided list of certificates.
36The I<caCerts> argument may be NULL or contain any number of certificates.
37
38OSSL_CMP_ITAV_get0_caCerts() requires that I<itav> has type B<caCerts>.
39It assigns NULL to I<*out> if there are no CA certificates in I<itav>, otherwise
40the internal pointer of type B<STACK_OF(X509)> with the certificates present.
41
01b04851
DDO
42OSSL_CMP_ITAV_new_rootCaCert() creates a new B<OSSL_CMP_ITAV> structure
43of type B<rootCaCert> that includes the optionally given certificate.
44
45OSSL_CMP_ITAV_get0_rootCaCert() requires that I<itav> has type B<rootCaCert>.
46It assigns NULL to I<*out> if no certificate is included in I<itav>, otherwise
47the internal pointer to the certificate contained in the infoValue field.
48
49OSSL_CMP_ITAV_new_rootCaKeyUpdate() creates a new B<OSSL_CMP_ITAV> structure
50of type B<rootCaKeyUpdate> that includes an RootCaKeyUpdateContent structure
51with the optional I<newWithNew>, I<newWithOld>, and I<oldWithNew> certificates.
52
53OSSL_CMP_ITAV_get0_rootCaKeyUpdate() requires that I<itav> has infoType
54B<rootCaKeyUpdate>.
55If an update of a root CA certificate is included,
56it assigns to I<*newWithNew> the internal pointer
57to the certificate contained in the newWithNew infoValue sub-field of I<itav>.
58If I<newWithOld> is not NULL, it assigns to I<*newWithOld> the internal pointer
59to the certificate contained in the newWithOld infoValue sub-field of I<itav>.
60If I<oldWithNew> is not NULL, it assigns to I<*oldWithNew> the internal pointer
61to the certificate contained in the oldWithNew infoValue sub-field of I<itav>.
62Each of these pointers will be NULL if the respective sub-field is not set.
63
d477484d
DDO
64=head1 NOTES
65
66CMP is defined in RFC 4210.
67
68=head1 RETURN VALUES
69
01b04851
DDO
70OSSL_CMP_ITAV_new_caCerts(),
71OSSL_CMP_ITAV_new_rootCaCert(), and OSSL_CMP_ITAV_new_rootCaKeyUpdate()
72return a pointer to the new ITAV structure on success, or NULL on error.
d477484d 73
01b04851
DDO
74OSSL_CMP_ITAV_get0_caCerts(),
75OSSL_CMP_ITAV_get0_rootCaCert(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
76return 1 on success, 0 on error.
d477484d
DDO
77
78=head1 SEE ALSO
79
80L<OSSL_CMP_ITAV_create(3)> and L<OSSL_CMP_ITAV_get0_type(3)>
81
82=head1 HISTORY
83
01b04851
DDO
84OSSL_CMP_ITAV_new_caCerts(), OSSL_CMP_ITAV_get0_caCerts(),
85OSSL_CMP_ITAV_new_rootCaCert(), OSSL_CMP_ITAV_get0_rootCaCert(),
86OSSL_CMP_ITAV_new_rootCaKeyUpdate(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
d477484d
DDO
87were added in OpenSSL 3.2.
88
89=head1 COPYRIGHT
90
da1c088f 91Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
d477484d
DDO
92
93Licensed under the Apache License 2.0 (the "License"). You may not use
94this file except in compliance with the License. You can obtain a copy
95in the file LICENSE in the source distribution or at
96L<https://www.openssl.org/source/license.html>.
97
98=cut