Debian Codegraph @

upstream/debian-unstable/man3/SSL_CTX_add_extra_chain_cert.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 "SSL_CTX_ADD_EXTRA_CHAIN_CERT 3SSL"
58 .TH SSL_CTX_ADD_EXTRA_CHAIN_CERT 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 SSL_CTX_add_extra_chain_cert,
65 SSL_CTX_get_extra_chain_certs,
66 SSL_CTX_get_extra_chain_certs_only,
67 SSL_CTX_clear_extra_chain_certs
68 \&\- add, get or clear extra chain certificates
69 .SH SYNOPSIS
70 .IX Header "SYNOPSIS"
71 .Vb 1
72 \& #include <openssl/ssl.h>
73 \&
74 \& long SSL_CTX_add_extra_chain_cert(SSL_CTX *ctx, X509 *x509);
75 \& long SSL_CTX_get_extra_chain_certs(SSL_CTX *ctx, STACK_OF(X509) **sk);
76 \& long SSL_CTX_get_extra_chain_certs_only(SSL_CTX *ctx, STACK_OF(X509) **sk);
77 \& long SSL_CTX_clear_extra_chain_certs(SSL_CTX *ctx);
78 .Ve
79 .SH DESCRIPTION
80 .IX Header "DESCRIPTION"
81 \&\fBSSL_CTX_add_extra_chain_cert()\fR adds the certificate \fBx509\fR to the extra chain
82 certificates associated with \fBctx\fR. Several certificates can be added one
83 after another.
84 .PP
85 \&\fBSSL_CTX_get_extra_chain_certs()\fR retrieves the extra chain certificates
86 associated with \fBctx\fR, or the chain associated with the current certificate
87 of \fBctx\fR if the extra chain is empty.
88 The returned stack should not be freed by the caller.
89 .PP
90 \&\fBSSL_CTX_get_extra_chain_certs_only()\fR retrieves the extra chain certificates
91 associated with \fBctx\fR.
92 The returned stack should not be freed by the caller.
93 .PP
94 \&\fBSSL_CTX_clear_extra_chain_certs()\fR clears all extra chain certificates
95 associated with \fBctx\fR.
96 .PP
97 These functions are implemented as macros.
98 .SH NOTES
99 .IX Header "NOTES"
100 When sending a certificate chain, extra chain certificates are sent in order
101 following the end entity certificate.
102 .PP
103 If no chain is specified, the library will try to complete the chain from the
104 available CA certificates in the trusted CA storage, see
105 \&\fBSSL_CTX_load_verify_locations\fR\|(3).
106 .PP
107 The \fBx509\fR certificate provided to \fBSSL_CTX_add_extra_chain_cert()\fR will be
108 freed by the library when the \fBSSL_CTX\fR is destroyed. An application
109 \&\fBshould not\fR free the \fBx509\fR object.
110 .SH RESTRICTIONS
111 .IX Header "RESTRICTIONS"
112 Only one set of extra chain certificates can be specified per SSL_CTX
113 structure. Different chains for different certificates (for example if both
114 RSA and DSA certificates are specified by the same server) or different SSL
115 structures with the same parent SSL_CTX cannot be specified using this
116 function. For more flexibility functions such as \fBSSL_add1_chain_cert()\fR should
117 be used instead.
118 .SH "RETURN VALUES"
119 .IX Header "RETURN VALUES"
120 \&\fBSSL_CTX_add_extra_chain_cert()\fR and \fBSSL_CTX_clear_extra_chain_certs()\fR return
121 1 on success and 0 for failure. Check out the error stack to find out the
122 reason for failure.
123 .SH "SEE ALSO"
124 .IX Header "SEE ALSO"
125 \&\fBssl\fR\|(7),
126 \&\fBSSL_CTX_use_certificate\fR\|(3),
127 \&\fBSSL_CTX_set_client_cert_cb\fR\|(3),
128 \&\fBSSL_CTX_load_verify_locations\fR\|(3)
129 \&\fBSSL_CTX_set0_chain\fR\|(3)
130 \&\fBSSL_CTX_set1_chain\fR\|(3)
131 \&\fBSSL_CTX_add0_chain_cert\fR\|(3)
132 \&\fBSSL_CTX_add1_chain_cert\fR\|(3)
133 \&\fBSSL_set0_chain\fR\|(3)
134 \&\fBSSL_set1_chain\fR\|(3)
135 \&\fBSSL_add0_chain_cert\fR\|(3)
136 \&\fBSSL_add1_chain_cert\fR\|(3)
137 \&\fBSSL_CTX_build_cert_chain\fR\|(3)
138 \&\fBSSL_build_cert_chain\fR\|(3)
139 .SH COPYRIGHT
140 .IX Header "COPYRIGHT"
141 Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
142 .PP
143 Licensed under the Apache License 2.0 (the "License"). You may not use
144 this file except in compliance with the License. You can obtain a copy
145 in the file LICENSE in the source distribution or at
146 <https://www.openssl.org/source/license.html>.