Debian Codegraph @

upstream/debian-unstable/man3/SSL_CTX_set_max_cert_list.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_SET_MAX_CERT_LIST 3SSL"
58 .TH SSL_CTX_SET_MAX_CERT_LIST 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_set_max_cert_list, SSL_CTX_get_max_cert_list, SSL_set_max_cert_list, SSL_get_max_cert_list \- manipulate allowed size for the peer's certificate chain
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 .Vb 1
68 \& #include <openssl/ssl.h>
69 \&
70 \& long SSL_CTX_set_max_cert_list(SSL_CTX *ctx, long size);
71 \& long SSL_CTX_get_max_cert_list(SSL_CTX *ctx);
72 \&
73 \& long SSL_set_max_cert_list(SSL *ssl, long size);
74 \& long SSL_get_max_cert_list(SSL *ctx);
75 .Ve
76 .SH DESCRIPTION
77 .IX Header "DESCRIPTION"
78 \&\fBSSL_CTX_set_max_cert_list()\fR sets the maximum size allowed for the peer's
79 certificate chain for all SSL objects created from \fBctx\fR to be <size> bytes.
80 The SSL objects inherit the setting valid for \fBctx\fR at the time
81 \&\fBSSL_new\fR\|(3) is being called.
82 .PP
83 \&\fBSSL_CTX_get_max_cert_list()\fR returns the currently set maximum size for \fBctx\fR.
84 .PP
85 \&\fBSSL_set_max_cert_list()\fR sets the maximum size allowed for the peer's
86 certificate chain for \fBssl\fR to be <size> bytes. This setting stays valid
87 until a new value is set.
88 .PP
89 \&\fBSSL_get_max_cert_list()\fR returns the currently set maximum size for \fBssl\fR.
90 .SH NOTES
91 .IX Header "NOTES"
92 During the handshake process, the peer may send a certificate chain.
93 The TLS/SSL standard does not give any maximum size of the certificate chain.
94 The OpenSSL library handles incoming data by a dynamically allocated buffer.
95 In order to prevent this buffer from growing without bounds due to data
96 received from a faulty or malicious peer, a maximum size for the certificate
97 chain is set.
98 .PP
99 The default value for the maximum certificate chain size is 100kB (30kB
100 on the 16\-bit DOS platform). This should be sufficient for usual certificate
101 chains (OpenSSL's default maximum chain length is 10, see
102 \&\fBSSL_CTX_set_verify\fR\|(3), and certificates
103 without special extensions have a typical size of 1\-2kB).
104 .PP
105 For special applications it can be necessary to extend the maximum certificate
106 chain size allowed to be sent by the peer, see e.g. the work on
107 "Internet X.509 Public Key Infrastructure Proxy Certificate Profile"
108 and "TLS Delegation Protocol" at http://www.ietf.org/ and
109 http://www.globus.org/ .
110 .PP
111 Under normal conditions it should never be necessary to set a value smaller
112 than the default, as the buffer is handled dynamically and only uses the
113 memory actually required by the data sent by the peer.
114 .PP
115 If the maximum certificate chain size allowed is exceeded, the handshake will
116 fail with an SSL_R_EXCESSIVE_MESSAGE_SIZE error.
117 .SH "RETURN VALUES"
118 .IX Header "RETURN VALUES"
119 \&\fBSSL_CTX_set_max_cert_list()\fR and \fBSSL_set_max_cert_list()\fR return the previously
120 set value.
121 .PP
122 \&\fBSSL_CTX_get_max_cert_list()\fR and \fBSSL_get_max_cert_list()\fR return the currently
123 set value.
124 .SH "SEE ALSO"
125 .IX Header "SEE ALSO"
126 \&\fBssl\fR\|(7), \fBSSL_new\fR\|(3),
127 \&\fBSSL_CTX_set_verify\fR\|(3)
128 .SH COPYRIGHT
129 .IX Header "COPYRIGHT"
130 Copyright 2001\-2020 The OpenSSL Project Authors. All Rights Reserved.
131 .PP
132 Licensed under the Apache License 2.0 (the "License"). You may not use
133 this file except in compliance with the License. You can obtain a copy
134 in the file LICENSE in the source distribution or at
135 <https://www.openssl.org/source/license.html>.