1SSL_CTX_SET_MAX_CERT_LIST(3ossl) OpenSSL SSL_CTX_SET_MAX_CERT_LIST(3ossl)
2
3
4
6 SSL_CTX_set_max_cert_list, SSL_CTX_get_max_cert_list,
7 SSL_set_max_cert_list, SSL_get_max_cert_list - manipulate allowed size
8 for the peer's certificate chain
9
11 #include <openssl/ssl.h>
12
13 long SSL_CTX_set_max_cert_list(SSL_CTX *ctx, long size);
14 long SSL_CTX_get_max_cert_list(SSL_CTX *ctx);
15
16 long SSL_set_max_cert_list(SSL *ssl, long size);
17 long SSL_get_max_cert_list(SSL *ctx);
18
20 SSL_CTX_set_max_cert_list() sets the maximum size allowed for the
21 peer's certificate chain for all SSL objects created from ctx to be
22 <size> bytes. The SSL objects inherit the setting valid for ctx at the
23 time SSL_new(3) is being called.
24
25 SSL_CTX_get_max_cert_list() returns the currently set maximum size for
26 ctx.
27
28 SSL_set_max_cert_list() sets the maximum size allowed for the peer's
29 certificate chain for ssl to be <size> bytes. This setting stays valid
30 until a new value is set.
31
32 SSL_get_max_cert_list() returns the currently set maximum size for ssl.
33
35 During the handshake process, the peer may send a certificate chain.
36 The TLS/SSL standard does not give any maximum size of the certificate
37 chain. The OpenSSL library handles incoming data by a dynamically
38 allocated buffer. In order to prevent this buffer from growing without
39 bounds due to data received from a faulty or malicious peer, a maximum
40 size for the certificate chain is set.
41
42 The default value for the maximum certificate chain size is 100kB (30kB
43 on the 16-bit DOS platform). This should be sufficient for usual
44 certificate chains (OpenSSL's default maximum chain length is 10, see
45 SSL_CTX_set_verify(3), and certificates without special extensions have
46 a typical size of 1-2kB).
47
48 For special applications it can be necessary to extend the maximum
49 certificate chain size allowed to be sent by the peer, see e.g. the
50 work on "Internet X.509 Public Key Infrastructure Proxy Certificate
51 Profile" and "TLS Delegation Protocol" at http://www.ietf.org/ and
52 http://www.globus.org/ .
53
54 Under normal conditions it should never be necessary to set a value
55 smaller than the default, as the buffer is handled dynamically and only
56 uses the memory actually required by the data sent by the peer.
57
58 If the maximum certificate chain size allowed is exceeded, the
59 handshake will fail with a SSL_R_EXCESSIVE_MESSAGE_SIZE error.
60
62 SSL_CTX_set_max_cert_list() and SSL_set_max_cert_list() return the
63 previously set value.
64
65 SSL_CTX_get_max_cert_list() and SSL_get_max_cert_list() return the
66 currently set value.
67
69 ssl(7), SSL_new(3), SSL_CTX_set_verify(3)
70
72 Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
73
74 Licensed under the Apache License 2.0 (the "License"). You may not use
75 this file except in compliance with the License. You can obtain a copy
76 in the file LICENSE in the source distribution or at
77 <https://www.openssl.org/source/license.html>.
78
79
80
813.0.5 2022-11-01 SSL_CTX_SET_MAX_CERT_LIST(3ossl)