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