]> git.ipfire.org Git - thirdparty/openssl.git/blame_incremental - doc/man3/OSSL_CMP_ITAV_new_caCerts.pod
Copyright year updates
[thirdparty/openssl.git] / doc / man3 / OSSL_CMP_ITAV_new_caCerts.pod
... / ...
CommitLineData
1=pod
2
3=head1 NAME
4
5OSSL_CMP_ITAV_new_caCerts,
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
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
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
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
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
64=head1 NOTES
65
66CMP is defined in RFC 4210.
67
68=head1 RETURN VALUES
69
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.
73
74OSSL_CMP_ITAV_get0_caCerts(),
75OSSL_CMP_ITAV_get0_rootCaCert(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
76return 1 on success, 0 on error.
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
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()
87were added in OpenSSL 3.2.
88
89=head1 COPYRIGHT
90
91Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
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