]>
Commit | Line | Data |
---|---|---|
7960dbec DDO |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
7960dbec DDO |
5 | ossl_cmp_asn1_octet_string_set1, |
6 | ossl_cmp_asn1_octet_string_set1_bytes, | |
7 | ossl_cmp_build_cert_chain | |
8 | - misc internal utility functions | |
9 | ||
10 | =head1 SYNOPSIS | |
11 | ||
706457b7 | 12 | #include "cmp_local.h" |
7960dbec | 13 | |
7960dbec DDO |
14 | int ossl_cmp_asn1_octet_string_set1(ASN1_OCTET_STRING **tgt, |
15 | const ASN1_OCTET_STRING *src); | |
16 | int ossl_cmp_asn1_octet_string_set1_bytes(ASN1_OCTET_STRING **tgt, | |
17 | const unsigned char *bytes, int len); | |
18 | ||
19 | STACK_OF(X509) *ossl_cmp_build_cert_chain(STACK_OF(X509) *certs, X509 *cert); | |
20 | ||
21 | =head1 DESCRIPTION | |
22 | ||
7960dbec | 23 | ossl_cmp_asn1_octet_string_set1() frees any previous value of the variable |
dfabee82 RL |
24 | referenced via the I<tgt> argument and assigns either a copy of |
25 | the ASN1_OCTET_STRING given as the I<src> argument or NULL. | |
7960dbec DDO |
26 | It returns 1 on success, 0 on error. |
27 | ||
28 | ossl_cmp_asn1_octet_string_set1_bytes() frees any previous value of the variable | |
dfabee82 | 29 | referenced via the I<tgt> argument and assigns either a copy of the given byte |
7960dbec DDO |
30 | string (with the given length) or NULL. It returns 1 on success, 0 on error. |
31 | ||
32 | ossl_cmp_build_cert_chain() builds up the certificate chain of cert as high up | |
33 | as possible using the given X509_STORE containing all possible intermediate | |
34 | certificates and optionally the (possible) trust anchor(s). | |
35 | ||
36 | =head1 RETURN VALUES | |
37 | ||
7960dbec DDO |
38 | ossl_cmp_build_cert_chain() |
39 | returns NULL on error, else a pointer to a stack of (up_ref'ed) certificates | |
40 | containing the EE certificate given in the function arguments (cert) | |
41 | and all intermediate certificates up the chain toward the trust anchor. | |
42 | The (self-signed) trust anchor is not included. | |
43 | ||
44 | All other functions return 1 on success, 0 on error. | |
45 | ||
46 | =head1 HISTORY | |
47 | ||
48 | The OpenSSL CMP support was added in OpenSSL 3.0. | |
49 | ||
50 | =head1 COPYRIGHT | |
51 | ||
33388b44 | 52 | Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. |
7960dbec DDO |
53 | |
54 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
55 | this file except in compliance with the License. You can obtain a copy | |
56 | in the file LICENSE in the source distribution or at | |
57 | L<https://www.openssl.org/source/license.html>. | |
58 | ||
59 | =cut |