blob: 3f2fa2ae8b19dc1fa9bb91726dc02ad4c6b5dace [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
Bence Szépkútibb0cfeb2021-05-28 09:42:25 +02002 * \file mbedtls_config.h
Paul Bakker5121ce52009-01-03 21:22:43 +00003 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Simon Butcher5b331b92016-01-03 16:14:14 +00006 * This set of compile-time options may be used to enable
7 * or disable features selectively, and reduce the global
8 * memory footprint.
Darryl Greena40a1012018-01-05 15:33:17 +00009 */
10/*
Bence Szépkúti1e148272020-08-07 13:07:28 +020011 * Copyright The Mbed TLS Contributors
Dave Rodgman16799db2023-11-02 19:47:20 +000012 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
Manuel Pégourié-Gonnarde2b0efe2015-08-11 10:38:37 +020013 */
14
Bence Szépkúti2bb74562021-06-21 16:19:00 +020015/**
Tom Cosgrove1e211442022-05-26 11:51:00 +010016 * This is an optional version symbol that enables compatibility handling of
Bence Szépkúti2bb74562021-06-21 16:19:00 +020017 * config files.
18 *
Bence Szépkúti1b2a8832021-06-28 10:26:11 +010019 * It is equal to the #MBEDTLS_VERSION_NUMBER of the Mbed TLS version that
Bence Szépkúti2bb74562021-06-21 16:19:00 +020020 * introduced the config format we want to be compatible with.
21 */
Bence Szépkúti1cafe5c2021-06-22 09:30:08 +020022//#define MBEDTLS_CONFIG_VERSION 0x03000000
Bence Szépkútiba7248a2021-05-31 16:53:56 +020023
Paul Bakkerf3b86c12011-01-27 15:24:17 +000024/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000025 * \name SECTION: System support
26 *
27 * This section sets system specific settings.
28 * \{
29 */
30
Paul Bakkerf3b86c12011-01-27 15:24:17 +000031/**
Gilles Peskinee820c0a2023-08-03 17:45:20 +020032 * \name SECTION: Mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +000033 *
34 * This section sets support for features that are or are not needed
35 * within the modules that are enabled.
36 * \{
37 */
Paul Bakker5121ce52009-01-03 21:22:43 +000038
Paul Bakkerf3b86c12011-01-27 15:24:17 +000039/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020040 * \def MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +010041 *
TRodziewiczd8540832021-06-10 15:16:50 +020042 * Uncomment to provide your own alternate implementation for
Manuel Pégourié-Gonnarda63bc942015-05-14 18:22:47 +020043 * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
Paul Bakkerf2561b32014-02-06 15:11:55 +010044 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020045 * Only works if you have MBEDTLS_TIMING_C enabled.
Paul Bakkerf2561b32014-02-06 15:11:55 +010046 *
47 * You will need to provide a header "timing_alt.h" and an implementation at
48 * compile time.
49 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020050//#define MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +010051
Paul Bakker90995b52013-06-24 19:20:35 +020052/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020053 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020054 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020055 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020056 *
Paul Bakkere07f41d2013-04-19 09:08:57 +020057 * This enables the following ciphersuites (if other requisites are
58 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020059 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
60 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
61 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
62 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
63 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
64 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
65 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
66 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
67 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
68 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020069 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020070#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020071
72/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020073 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +020074 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020075 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +020076 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020077 * Requires: MBEDTLS_DHM_C
Paul Bakkere07f41d2013-04-19 09:08:57 +020078 *
79 * This enables the following ciphersuites (if other requisites are
80 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020081 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
82 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
83 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
84 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
85 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
86 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
87 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
88 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
89 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
90 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
Hanno Beckera2f6b722017-09-28 10:33:29 +010091 *
Hanno Beckerf9734b32017-10-03 12:09:22 +010092 * \warning Using DHE constitutes a security risk as it
93 * is not possible to validate custom DH parameters.
94 * If possible, it is recommended users should consider
95 * preferring other methods of key exchange.
96 * See dhm.h for more details.
Hanno Beckera2f6b722017-09-28 10:33:29 +010097 *
Paul Bakkere07f41d2013-04-19 09:08:57 +020098 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020099#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200100
101/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200102 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200103 *
104 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
105 *
Janos Follath277bba82024-11-19 16:14:00 +0000106 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200107 *
108 * This enables the following ciphersuites (if other requisites are
109 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200110 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
111 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
112 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
113 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
114 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
115 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200116 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200117#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200118
119/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200120 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200121 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200122 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200123 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200124 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
125 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200126 *
127 * This enables the following ciphersuites (if other requisites are
128 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200129 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
130 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
131 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
132 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
133 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
134 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
135 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
136 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
137 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
138 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
139 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
140 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200141 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200142#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200143
144/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200145 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200146 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200147 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200148 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200149 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
150 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200151 *
152 * This enables the following ciphersuites (if other requisites are
153 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200154 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
155 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
156 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
157 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
158 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
159 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
160 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
161 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
162 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
163 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
164 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
165 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Hanno Beckera2f6b722017-09-28 10:33:29 +0100166 *
Hanno Beckerf9734b32017-10-03 12:09:22 +0100167 * \warning Using DHE constitutes a security risk as it
168 * is not possible to validate custom DH parameters.
169 * If possible, it is recommended users should consider
170 * preferring other methods of key exchange.
171 * See dhm.h for more details.
Hanno Beckera2f6b722017-09-28 10:33:29 +0100172 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200173 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200174#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200175
176/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200177 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200178 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200179 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200180 *
Janos Follath277bba82024-11-19 16:14:00 +0000181 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200182 * MBEDTLS_RSA_C
183 * MBEDTLS_PKCS1_V15
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200184 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200185 *
186 * This enables the following ciphersuites (if other requisites are
187 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200188 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
189 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
190 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
191 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
192 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
193 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
194 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
195 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
196 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
197 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakkere07f41d2013-04-19 09:08:57 +0200198 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200199#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200200
201/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200202 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200203 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200204 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200205 *
Janos Follath277bba82024-11-19 16:14:00 +0000206 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
207 * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200208 * MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200209 *
210 * This enables the following ciphersuites (if other requisites are
211 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200212 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
213 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
214 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
215 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
216 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
217 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
218 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
219 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
220 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
221 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200222 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200223#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200224
225/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200226 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100227 *
228 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
229 *
Janos Follath277bba82024-11-19 16:14:00 +0000230 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
231 * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200232 * MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100233 *
234 * This enables the following ciphersuites (if other requisites are
235 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200236 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
237 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
238 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
239 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
240 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
241 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
242 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
243 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
244 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
245 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100246 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200247#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100248
249/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200250 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100251 *
252 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
253 *
Janos Follath277bba82024-11-19 16:14:00 +0000254 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200255 * MBEDTLS_RSA_C
256 * MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100257 *
258 * This enables the following ciphersuites (if other requisites are
259 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200260 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
261 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
262 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
263 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
264 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
265 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
266 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
267 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
268 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
269 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100270 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200271#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100272
273/**
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200274 * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
275 *
276 * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
277 *
Manuel Pégourié-Gonnard75df9022015-09-16 23:21:01 +0200278 * \warning This is currently experimental. EC J-PAKE support is based on the
279 * Thread v1.0.0 specification; incompatible changes to the specification
280 * might still happen. For this reason, this is disabled by default.
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200281 *
Janos Follath277bba82024-11-19 16:14:00 +0000282 * Requires: MBEDTLS_ECJPAKE_C or PSA_WANT_ALG_JPAKE
Manuel Pégourié-Gonnard41bc8b62023-03-14 23:59:24 +0100283 * SHA-256 (via MBEDTLS_SHA256_C or a PSA driver)
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200284 * MBEDTLS_ECP_DP_SECP256R1_ENABLED
285 *
286 * This enables the following ciphersuites (if other requisites are
287 * enabled as well):
288 * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
289 */
Manuel Pégourié-Gonnardcf828932015-10-20 14:57:00 +0200290//#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200291
292/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200293 * \def MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100294 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200295 * Enable a dummy error function to make use of mbedtls_strerror() in
296 * third party libraries easier when MBEDTLS_ERROR_C is disabled
297 * (no effect when MBEDTLS_ERROR_C is enabled).
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200298 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200299 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
300 * not using mbedtls_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100301 *
302 * Disable if you run into name conflicts and want to really remove the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200303 * mbedtls_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100304 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200305#define MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100306
307/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200308 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100309 *
310 * Enable sending of alert messages in case of encountered errors as per RFC.
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200311 * If you choose not to send the alert messages, Mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100312 * with other servers, only debugging of failures is harder.
313 *
314 * The advantage of not sending alert messages, is that no information is given
315 * about reasons for failures thus preventing adversaries of gaining intel.
316 *
317 * Enable sending of all alert messages
318 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200319#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100320
321/**
Gilles Peskined3d02902020-03-04 21:35:27 +0100322 * \def MBEDTLS_SSL_DTLS_CONNECTION_ID
323 *
Hannes Tschofenige2c46e02022-11-23 10:44:11 +0100324 * Enable support for the DTLS Connection ID (CID) extension,
Gilles Peskined3d02902020-03-04 21:35:27 +0100325 * which allows to identify DTLS connections across changes
Hannes Tschofenige2c46e02022-11-23 10:44:11 +0100326 * in the underlying transport. The CID functionality is described
327 * in RFC 9146.
Gilles Peskined3d02902020-03-04 21:35:27 +0100328 *
329 * Setting this option enables the SSL APIs `mbedtls_ssl_set_cid()`,
Paul Elliott0113cf12022-03-11 20:26:47 +0000330 * mbedtls_ssl_get_own_cid()`, `mbedtls_ssl_get_peer_cid()` and
331 * `mbedtls_ssl_conf_cid()`. See the corresponding documentation for
332 * more information.
Gilles Peskined3d02902020-03-04 21:35:27 +0100333 *
Gilles Peskined3d02902020-03-04 21:35:27 +0100334 * The maximum lengths of outgoing and incoming CIDs can be configured
335 * through the options
336 * - MBEDTLS_SSL_CID_OUT_LEN_MAX
337 * - MBEDTLS_SSL_CID_IN_LEN_MAX.
338 *
339 * Requires: MBEDTLS_SSL_PROTO_DTLS
340 *
341 * Uncomment to enable the Connection ID extension.
342 */
Hannes Tschofenigfd6cca42021-10-12 09:22:33 +0200343#define MBEDTLS_SSL_DTLS_CONNECTION_ID
344
345
346/**
347 * \def MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT
348 *
349 * Defines whether RFC 9146 (default) or the legacy version
350 * (version draft-ietf-tls-dtls-connection-id-05,
351 * https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05)
352 * is used.
353 *
354 * Set the value to 0 for the standard version, and
355 * 1 for the legacy draft version.
356 *
Hannes Tschofenige2c46e02022-11-23 10:44:11 +0100357 * \deprecated Support for the legacy version of the DTLS
358 * Connection ID feature is deprecated. Please
359 * switch to the standardized version defined
360 * in RFC 9146 enabled by utilizing
361 * MBEDTLS_SSL_DTLS_CONNECTION_ID without use
362 * of MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT.
363 *
Hannes Tschofenigfd6cca42021-10-12 09:22:33 +0200364 * Requires: MBEDTLS_SSL_DTLS_CONNECTION_ID
365 */
366#define MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 0
Gilles Peskined3d02902020-03-04 21:35:27 +0100367
368/**
Gilles Peskineb74a1c72018-04-24 13:09:22 +0200369 * \def MBEDTLS_SSL_ASYNC_PRIVATE
370 *
371 * Enable asynchronous external private key operations in SSL. This allows
372 * you to configure an SSL connection to call an external cryptographic
373 * module to perform private key operations instead of performing the
374 * operation inside the library.
375 *
Valerio Setti8841d6b2023-01-05 08:40:24 +0100376 * Requires: MBEDTLS_X509_CRT_PARSE_C
Gilles Peskineb74a1c72018-04-24 13:09:22 +0200377 */
Jaeden Amerod9c71da2018-06-15 20:31:26 +0100378//#define MBEDTLS_SSL_ASYNC_PRIVATE
Gilles Peskineb74a1c72018-04-24 13:09:22 +0200379
380/**
Gilles Peskined3d02902020-03-04 21:35:27 +0100381 * \def MBEDTLS_SSL_CONTEXT_SERIALIZATION
382 *
383 * Enable serialization of the TLS context structures, through use of the
384 * functions mbedtls_ssl_context_save() and mbedtls_ssl_context_load().
385 *
386 * This pair of functions allows one side of a connection to serialize the
387 * context associated with the connection, then free or re-use that context
388 * while the serialized state is persisted elsewhere, and finally deserialize
389 * that state to a live context for resuming read/write operations on the
390 * connection. From a protocol perspective, the state of the connection is
391 * unaffected, in particular this is entirely transparent to the peer.
392 *
393 * Note: this is distinct from TLS session resumption, which is part of the
394 * protocol and fully visible by the peer. TLS session resumption enables
395 * establishing new connections associated to a saved session with shorter,
396 * lighter handshakes, while context serialization is a local optimization in
397 * handling a single, potentially long-lived connection.
398 *
399 * Enabling these APIs makes some SSL structures larger, as 64 extra bytes are
400 * saved after the handshake to allow for more efficient serialization, so if
401 * you don't need this feature you'll save RAM by disabling it.
402 *
Przemek Stekiel460192e2022-10-03 08:55:29 +0200403 * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C
404 *
Gilles Peskined3d02902020-03-04 21:35:27 +0100405 * Comment to disable the context serialization APIs.
406 */
407#define MBEDTLS_SSL_CONTEXT_SERIALIZATION
408
409/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200410 * \def MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100411 *
412 * Enable the debug messages in SSL module for all issues.
413 * Debug messages have been disabled in some places to prevent timing
414 * attacks due to (unbalanced) debugging function calls.
415 *
416 * If you need all error reporting you should enable this during debugging,
417 * but remove this for production servers that should log as well.
418 *
419 * Uncomment this macro to report all debug messages on errors introducing
420 * a timing side-channel.
421 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100422 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200423//#define MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100424
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200425/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100426 *
427 * Enable support for Encrypt-then-MAC, RFC 7366.
428 *
429 * This allows peers that both support it to use a more robust protection for
430 * ciphersuites using CBC, providing deep resistance against timing attacks
431 * on the padding or underlying cipher.
432 *
433 * This only affects CBC ciphersuites, and is useless if none is defined.
434 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200435 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100436 *
437 * Comment this macro to disable support for Encrypt-then-MAC
438 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200439#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100440
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200441/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200442 *
Manuel Pégourié-Gonnardbca8aa02020-03-24 12:11:49 +0100443 * Enable support for RFC 7627: Session Hash and Extended Master Secret
444 * Extension.
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200445 *
Shaun Case8b0ecbc2021-12-20 21:14:10 -0800446 * This was introduced as "the proper fix" to the Triple Handshake family of
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200447 * attacks, but it is recommended to always use it (even if you disable
448 * renegotiation), since it actually fixes a more fundamental issue in the
449 * original SSL/TLS design, and has implications beyond Triple Handshake.
450 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200451 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100452 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200453 * Comment this macro to disable support for Extended Master Secret.
454 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200455#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200456
Paul Bakkerd66f0702013-01-31 16:57:45 +0100457/**
Hanno Beckerbb278f52019-02-05 17:04:00 +0000458 * \def MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
459 *
Hanno Beckerfd7f2982019-02-25 10:13:33 +0000460 * This option controls the availability of the API mbedtls_ssl_get_peer_cert()
Hanno Beckerbb278f52019-02-05 17:04:00 +0000461 * giving access to the peer's certificate after completion of the handshake.
462 *
463 * Unless you need mbedtls_ssl_peer_cert() in your application, it is
464 * recommended to disable this option for reduced RAM usage.
465 *
466 * \note If this option is disabled, mbedtls_ssl_get_peer_cert() is still
467 * defined, but always returns \c NULL.
468 *
469 * \note This option has no influence on the protection against the
470 * triple handshake attack. Even if it is disabled, Mbed TLS will
471 * still ensure that certificates do not change during renegotiation,
Shaun Case8b0ecbc2021-12-20 21:14:10 -0800472 * for example by keeping a hash of the peer's certificate.
Hanno Beckerbb278f52019-02-05 17:04:00 +0000473 *
Tom Cosgroveafb2fe12022-06-29 16:36:12 +0100474 * \note This option is required if MBEDTLS_SSL_PROTO_TLS1_3 is set.
Hanno Beckerbb278f52019-02-05 17:04:00 +0000475 *
476 * Comment this macro to disable storing the peer's certificate
477 * after the handshake.
478 */
479#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
480
481/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200482 * \def MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100483 *
Hanno Becker0eb8fb82018-10-26 09:53:16 +0100484 * Enable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100485 *
486 * The two main uses of renegotiation are (1) refresh keys on long-lived
487 * connections and (2) client authentication after the initial handshake.
488 * If you don't need renegotiation, it's probably better to disable it, since
489 * it has been associated with security issues in the past and is easy to
490 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100491 *
jnmeurisse83f0a652023-09-16 18:12:18 +0200492 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
493 *
Manuel Pégourié-Gonnard55f968b2015-03-09 16:23:15 +0000494 * Comment this to disable support for renegotiation.
Hanno Becker6851b102017-10-12 14:57:48 +0100495 *
496 * \note Even if this option is disabled, both client and server are aware
497 * of the Renegotiation Indication Extension (RFC 5746) used to
498 * prevent the SSL renegotiation attack (see RFC 5746 Sect. 1).
499 * (See \c mbedtls_ssl_conf_legacy_renegotiation for the
500 * configuration of this extension).
501 *
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100502 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200503#define MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100504
505/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200506 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200507 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200508 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200509 *
510 * Comment this macro to disable support for the max_fragment_length extension
511 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200512#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200513
514/**
Jan Bruckner151f6422023-02-10 12:45:19 +0100515 * \def MBEDTLS_SSL_RECORD_SIZE_LIMIT
516 *
Jan Brucknera0589e72023-03-15 11:04:45 +0100517 * Enable support for RFC 8449 record_size_limit extension in SSL (TLS 1.3 only).
Jan Bruckner151f6422023-02-10 12:45:19 +0100518 *
Jan Bruckner151f6422023-02-10 12:45:19 +0100519 * Requires: MBEDTLS_SSL_PROTO_TLS1_3
520 *
521 * Uncomment this macro to enable support for the record_size_limit extension
522 */
523//#define MBEDTLS_SSL_RECORD_SIZE_LIMIT
524
525/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200526 * \def MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200527 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100528 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200529 *
Janos Follath277bba82024-11-19 16:14:00 +0000530 * Requires: PSA_WANT_ALG_SHA_256 or PSA_WANT_ALG_SHA_384
Andrzej Kureke02da812022-08-17 17:04:49 -0400531 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100532 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200533 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200534#define MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200535
536/**
Ronald Cron6f135e12021-12-08 16:57:54 +0100537 * \def MBEDTLS_SSL_PROTO_TLS1_3
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100538 *
Ronald Cron6f135e12021-12-08 16:57:54 +0100539 * Enable support for TLS 1.3.
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100540 *
Gilles Peskineda69eaa2023-09-05 20:54:17 +0200541 * \note See docs/architecture/tls13-support.md for a description of the TLS
Ronald Cron6f135e12021-12-08 16:57:54 +0100542 * 1.3 support that this option enables.
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100543 *
Tom Cosgroveafb2fe12022-06-29 16:36:12 +0100544 * Requires: MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
Manuel Pégourié-Gonnard3e830982022-05-11 13:27:44 +0200545 * Requires: MBEDTLS_PSA_CRYPTO_C
Ronald Cron6f135e12021-12-08 16:57:54 +0100546 *
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100547 * Uncomment this macro to enable the support for TLS 1.3.
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100548 */
Ronald Cron27eb68d2024-03-15 16:13:37 +0100549#define MBEDTLS_SSL_PROTO_TLS1_3
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100550
551/**
Ronald Cronab65c522021-11-24 10:47:20 +0100552 * \def MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
553 *
554 * Enable TLS 1.3 middlebox compatibility mode.
555 *
556 * As specified in Section D.4 of RFC 8446, TLS 1.3 offers a compatibility
557 * mode to make a TLS 1.3 connection more likely to pass through middle boxes
558 * expecting TLS 1.2 traffic.
559 *
560 * Turning on the compatibility mode comes at the cost of a few added bytes
561 * on the wire, but it doesn't affect compatibility with TLS 1.3 implementations
562 * that don't use it. Therefore, unless transmission bandwidth is critical and
563 * you know that middlebox compatibility issues won't occur, it is therefore
564 * recommended to set this option.
565 *
566 * Comment to disable compatibility mode for TLS 1.3. If
Ronald Cron6f135e12021-12-08 16:57:54 +0100567 * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
568 * effect on the build.
Ronald Cronab65c522021-11-24 10:47:20 +0100569 *
570 */
Ronald Cron27eb68d2024-03-15 16:13:37 +0100571#define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
Ronald Cronab65c522021-11-24 10:47:20 +0100572
573/**
Ronald Crond8d2ea52022-10-04 15:48:06 +0200574 * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
575 *
576 * Enable TLS 1.3 PSK key exchange mode.
577 *
578 * Comment to disable support for the PSK key exchange mode in TLS 1.3. If
579 * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
580 * effect on the build.
581 *
582 */
583#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
584
585/**
586 * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
587 *
588 * Enable TLS 1.3 ephemeral key exchange mode.
589 *
Przemek Stekielce05f542023-06-15 16:44:08 +0200590 * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200591 * MBEDTLS_X509_CRT_PARSE_C
592 * and at least one of:
Janos Follath277bba82024-11-19 16:14:00 +0000593 * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200594 * MBEDTLS_PKCS1_V21
Ronald Crond8d2ea52022-10-04 15:48:06 +0200595 *
596 * Comment to disable support for the ephemeral key exchange mode in TLS 1.3.
597 * If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
598 * effect on the build.
599 *
600 */
601#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
602
603/**
604 * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
605 *
606 * Enable TLS 1.3 PSK ephemeral key exchange mode.
607 *
Przemek Stekielce05f542023-06-15 16:44:08 +0200608 * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH
Ronald Crond8d2ea52022-10-04 15:48:06 +0200609 *
610 * Comment to disable support for the PSK ephemeral key exchange mode in
611 * TLS 1.3. If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not
612 * have any effect on the build.
613 *
614 */
615#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
616
617/**
Gilles Peskine449bd832023-01-11 14:50:10 +0100618 * \def MBEDTLS_SSL_EARLY_DATA
619 *
620 * Enable support for RFC 8446 TLS 1.3 early data.
621 *
622 * Requires: MBEDTLS_SSL_SESSION_TICKETS and either
623 * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED or
624 * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
625 *
626 * Comment this to disable support for early data. If MBEDTLS_SSL_PROTO_TLS1_3
627 * is not enabled, this option does not have any effect on the build.
628 *
Tom Cosgrovea63775b2023-09-14 13:31:19 +0100629 * \note The maximum amount of early data can be set with
630 * MBEDTLS_SSL_MAX_EARLY_DATA_SIZE.
631 *
Gilles Peskine449bd832023-01-11 14:50:10 +0100632 */
Ronald Cronc2e110f2022-11-22 09:01:46 +0100633//#define MBEDTLS_SSL_EARLY_DATA
Xiaokang Qian54413b12022-10-20 05:57:03 +0000634
635/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200636 * \def MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100637 *
638 * Enable support for DTLS (all available versions).
639 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200640 * Enable this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100641 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200642 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100643 *
644 * Comment this macro to disable support for DTLS
645 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200646#define MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100647
648/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200649 * \def MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200650 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +0100651 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200652 *
Paul Bakker27e36d32014-04-08 12:33:37 +0200653 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200654 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200655#define MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200656
657/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200658 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200659 *
660 * Enable support for the anti-replay mechanism in DTLS.
661 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200662 * Requires: MBEDTLS_SSL_TLS_C
663 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200664 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +0200665 * \warning Disabling this is often a security risk!
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +0200666 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +0200667 *
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200668 * Comment this to disable anti-replay in DTLS.
669 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200670#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200671
672/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200673 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +0200674 *
675 * Enable support for HelloVerifyRequest on DTLS servers.
676 *
677 * This feature is highly recommended to prevent DTLS servers being used as
678 * amplifiers in DoS attacks against other hosts. It should always be enabled
679 * unless you know for sure amplification cannot be a problem in the
680 * environment in which your server operates.
681 *
Andrzej Kurek5c65c572022-04-13 14:28:52 -0400682 * \warning Disabling this can be a security risk! (see above)
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +0200683 *
Manuel Pégourié-Gonnarde057d3b2015-05-20 10:59:43 +0200684 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +0200685 *
686 * Comment this to disable support for HelloVerifyRequest.
687 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200688#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +0200689
690/**
Johan Pascalb62bb512015-12-03 21:56:45 +0100691 * \def MBEDTLS_SSL_DTLS_SRTP
692 *
Tobias Nießen1e8ca122021-05-10 19:53:15 +0200693 * Enable support for negotiation of DTLS-SRTP (RFC 5764)
Johan Pascal842d6712020-09-23 13:34:40 +0200694 * through the use_srtp extension.
695 *
696 * \note This feature provides the minimum functionality required
697 * to negotiate the use of DTLS-SRTP and to allow the derivation of
698 * the associated SRTP packet protection key material.
699 * In particular, the SRTP packet protection itself, as well as the
700 * demultiplexing of RTP and DTLS packets at the datagram layer
701 * (see Section 5 of RFC 5764), are not handled by this feature.
702 * Instead, after successful completion of a handshake negotiating
703 * the use of DTLS-SRTP, the extended key exporter API
Hanno Becker2d6e6f82021-05-24 10:58:31 +0100704 * mbedtls_ssl_conf_export_keys_cb() should be used to implement
Johan Pascal842d6712020-09-23 13:34:40 +0200705 * the key exporter described in Section 4.2 of RFC 5764 and RFC 5705
706 * (this is implemented in the SSL example programs).
707 * The resulting key should then be passed to an SRTP stack.
708 *
709 * Setting this option enables the runtime API
710 * mbedtls_ssl_conf_dtls_srtp_protection_profiles()
711 * through which the supported DTLS-SRTP protection
712 * profiles can be configured. You must call this API at
713 * runtime if you wish to negotiate the use of DTLS-SRTP.
Johan Pascalb62bb512015-12-03 21:56:45 +0100714 *
715 * Requires: MBEDTLS_SSL_PROTO_DTLS
716 *
Ron Eldor9cfb5eb2018-12-10 15:30:14 +0200717 * Uncomment this to enable support for use_srtp extension.
Johan Pascalb62bb512015-12-03 21:56:45 +0100718 */
Ron Eldor9cfb5eb2018-12-10 15:30:14 +0200719//#define MBEDTLS_SSL_DTLS_SRTP
Johan Pascalb62bb512015-12-03 21:56:45 +0100720
721/**
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +0200722 * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
723 *
724 * Enable server-side support for clients that reconnect from the same port.
725 *
726 * Some clients unexpectedly close the connection and try to reconnect using the
727 * same source port. This needs special support from the server to handle the
Simon Butcher4f6882a2015-09-11 17:12:46 +0100728 * new connection securely, as described in section 4.2.8 of RFC 6347. This
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +0200729 * flag enables that support.
730 *
Manuel Pégourié-Gonnard62c74bb2015-09-08 17:50:29 +0200731 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard62c74bb2015-09-08 17:50:29 +0200732 *
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +0200733 * Comment this to disable support for clients reusing the source port.
734 */
735#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
736
737/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200738 * \def MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +0200739 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200740 * Enable support for RFC 5077 session tickets in SSL.
Antonin Décimo36e89b52019-01-23 15:24:37 +0100741 * Client-side, provides full support for session tickets (maintenance of a
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +0200742 * session store remains the responsibility of the application, though).
743 * Server-side, you also need to provide callbacks for writing and parsing
744 * tickets, including authenticated encryption and key management. Example
745 * callbacks are provided by MBEDTLS_SSL_TICKET_C.
Paul Bakkera503a632013-08-14 13:48:06 +0200746 *
747 * Comment this macro to disable support for SSL session tickets
748 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200749#define MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +0200750
751/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200752 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +0200753 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200754 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200755 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200756 * Requires: MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +0000757 *
Paul Bakker0be444a2013-08-27 21:55:01 +0200758 * Comment this macro to disable support for server name indication in SSL
759 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200760#define MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +0200761
762/**
Gilles Peskinef03bd812020-03-23 18:13:58 +0100763 * \def MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
764 *
Andrzej Kurek2a54a6f2021-01-07 08:13:49 -0500765 * When this option is enabled, the SSL buffer will be resized automatically
766 * based on the negotiated maximum fragment length in each direction.
Andrzej Kurek557289b2020-10-21 15:12:39 +0200767 *
768 * Requires: MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Gilles Peskinef03bd812020-03-23 18:13:58 +0100769 */
770//#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
771
772/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200773 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200774 *
775 * Allow run-time checking of compile-time enabled features. Thus allowing users
776 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200777 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200778 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200779 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200780 *
781 * Comment this to disable run-time checking and save ROM space
782 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200783#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200784
785/**
Hanno Becker288dedc2019-03-27 11:00:53 +0000786 * \def MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
787 *
Jarno Lamsaf49fedc2019-04-01 14:58:30 +0300788 * If set, this enables the X.509 API `mbedtls_x509_crt_verify_with_ca_cb()`
Hanno Becker288dedc2019-03-27 11:00:53 +0000789 * and the SSL API `mbedtls_ssl_conf_ca_cb()` which allow users to configure
790 * the set of trusted certificates through a callback instead of a linked
791 * list.
792 *
793 * This is useful for example in environments where a large number of trusted
794 * certificates is present and storing them in a linked list isn't efficient
795 * enough, or when the set of trusted certificates changes frequently.
796 *
Jarno Lamsaf49fedc2019-04-01 14:58:30 +0300797 * See the documentation of `mbedtls_x509_crt_verify_with_ca_cb()` and
Hanno Becker288dedc2019-03-27 11:00:53 +0000798 * `mbedtls_ssl_conf_ca_cb()` for more information.
799 *
Valerio Setti8e45cdd2023-01-05 09:32:29 +0100800 * Requires: MBEDTLS_X509_CRT_PARSE_C
801 *
Hanno Becker288dedc2019-03-27 11:00:53 +0000802 * Uncomment to enable trusted certificate callbacks.
803 */
804//#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
805
806/**
Hanno Becker612a2f12020-10-09 09:19:39 +0100807 * \def MBEDTLS_X509_REMOVE_INFO
Peter Kolbus9a969b62018-12-11 13:55:56 -0600808 *
Chris Jones2c745862020-12-16 11:41:06 +0000809 * Disable mbedtls_x509_*_info() and related APIs.
Peter Kolbus9a969b62018-12-11 13:55:56 -0600810 *
Chris Jones2c745862020-12-16 11:41:06 +0000811 * Uncomment to omit mbedtls_x509_*_info(), as well as mbedtls_debug_print_crt()
Peter Kolbus9a969b62018-12-11 13:55:56 -0600812 * and other functions/constants only used by these functions, thus reducing
813 * the code footprint by several KB.
814 */
Chris Jones2c745862020-12-16 11:41:06 +0000815//#define MBEDTLS_X509_REMOVE_INFO
Peter Kolbus9a969b62018-12-11 13:55:56 -0600816
817/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200818 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +0200819 *
820 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
821 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
822 *
Tomi Fontanillesa70b3c22023-07-16 12:06:13 +0300823 * Requires: MBEDTLS_PKCS1_V21
824 *
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +0200825 * Comment this macro to disallow using RSASSA-PSS in certificates.
826 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200827#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200828/** \} name SECTION: Mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000829
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000830/**
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200831 * \name SECTION: Mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +0000832 *
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200833 * This section enables or disables entire modules in Mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +0000834 * \{
835 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000836
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000837/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200838 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000839 *
840 * Enable the debug functions.
841 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000842 * Module: library/debug.c
Ronald Cronde1adee2022-03-07 16:20:30 +0100843 * Caller: library/ssl_msg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000844 * library/ssl_tls.c
Ronald Cronde1adee2022-03-07 16:20:30 +0100845 * library/ssl_tls12_*.c
846 * library/ssl_tls13_*.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000847 *
848 * This module provides debugging functions.
849 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200850#define MBEDTLS_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000851
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000852/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200853 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +0000854 *
855 * Enable error code to error string conversion.
856 *
857 * Module: library/error.c
858 * Caller:
859 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200860 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +0000861 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200862#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +0000863
864/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200865 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000866 *
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100867 * Enable the TCP and UDP over IPv6/IPv4 networking routines.
868 *
Simon Butcherd567a232016-03-09 20:19:21 +0000869 * \note This module only works on POSIX/Unix (including Linux, BSD and OS X)
870 * and Windows. For other platforms, you'll want to disable it, and write your
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100871 * own networking callbacks to be passed to \c mbedtls_ssl_set_bio().
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000872 *
Manuel Pégourié-Gonnard02049dc2016-02-22 16:42:51 +0000873 * \note See also our Knowledge Base article about porting to a new
874 * environment:
Dave Rodgmanb3196842022-10-12 16:47:08 +0100875 * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
Manuel Pégourié-Gonnard02049dc2016-02-22 16:42:51 +0000876 *
Andres AG788aa4a2016-09-14 14:32:09 +0100877 * Module: library/net_sockets.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000878 *
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100879 * This module provides networking routines.
Paul Bakker5121ce52009-01-03 21:22:43 +0000880 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200881#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000882
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000883/**
Nayna Jainc9deb182020-11-16 19:03:12 +0000884 * \def MBEDTLS_PKCS7_C
885 *
Dave Rodgman3fe2abf2023-03-10 17:05:54 +0000886 * Enable PKCS #7 core for using PKCS #7-formatted signatures.
Nayna Jainc9deb182020-11-16 19:03:12 +0000887 * RFC Link - https://tools.ietf.org/html/rfc2315
888 *
889 * Module: library/pkcs7.c
890 *
891 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
Nick Child89e82e12022-11-09 10:36:10 -0600892 * MBEDTLS_X509_CRT_PARSE_C MBEDTLS_X509_CRL_PARSE_C,
893 * MBEDTLS_BIGNUM_C, MBEDTLS_MD_C
Nayna Jainc9deb182020-11-16 19:03:12 +0000894 *
Dave Rodgmanefbc5f72023-03-13 12:15:49 +0000895 * This module is required for the PKCS #7 parsing modules.
Nayna Jainc9deb182020-11-16 19:03:12 +0000896 */
Dave Rodgman7c33b0c2023-03-10 15:07:15 +0000897#define MBEDTLS_PKCS7_C
Nayna Jainc9deb182020-11-16 19:03:12 +0000898
899/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200900 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +0000901 *
902 * Enable simple SSL cache implementation.
903 *
904 * Module: library/ssl_cache.c
905 * Caller:
906 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200907 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +0000908 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200909#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +0000910
911/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200912 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +0200913 *
914 * Enable basic implementation of DTLS cookies for hello verification.
915 *
916 * Module: library/ssl_cookie.c
917 * Caller:
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +0200918 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200919#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +0200920
921/**
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +0200922 * \def MBEDTLS_SSL_TICKET_C
923 *
924 * Enable an implementation of TLS server-side callbacks for session tickets.
925 *
926 * Module: library/ssl_ticket.c
927 * Caller:
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +0200928 *
Przemek Stekiel52a428b2022-10-10 08:47:13 +0200929 * Requires: (MBEDTLS_CIPHER_C || MBEDTLS_USE_PSA_CRYPTO) &&
930 * (MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C)
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +0200931 */
932#define MBEDTLS_SSL_TICKET_C
933
934/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200935 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000936 *
937 * Enable the SSL/TLS client code.
938 *
Ronald Cronde1adee2022-03-07 16:20:30 +0100939 * Module: library/ssl*_client.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000940 * Caller:
941 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200942 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000943 *
Janos Follath745e5612024-12-02 13:22:34 +0000944 * \warning You must call psa_crypto_init() before doing any TLS operations.
945 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000946 * This module is required for SSL/TLS client support.
947 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200948#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000949
Paul Bakker9a736322012-11-14 12:39:52 +0000950/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200951 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000952 *
953 * Enable the SSL/TLS server code.
954 *
Ronald Cronde1adee2022-03-07 16:20:30 +0100955 * Module: library/ssl*_server.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000956 * Caller:
957 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200958 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000959 *
Janos Follath745e5612024-12-02 13:22:34 +0000960 * \warning You must call psa_crypto_init() before doing any TLS operations.
961 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000962 * This module is required for SSL/TLS server support.
963 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200964#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000965
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000966/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200967 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000968 *
Paul Bakkere29ab062011-05-18 13:26:54 +0000969 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000970 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000971 * Module: library/ssl_tls.c
Ronald Cronde1adee2022-03-07 16:20:30 +0100972 * Caller: library/ssl*_client.c
973 * library/ssl*_server.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000974 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200975 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
976 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +0000977 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000978 * This module is required for SSL/TLS.
979 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200980#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000981
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000982/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200983 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000984 *
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100985 * Enable the semi-portable timing interface.
986 *
Simon Butcherd567a232016-03-09 20:19:21 +0000987 * \note The provided implementation only works on POSIX/Unix (including Linux,
988 * BSD and OS X) and Windows. On other platforms, you can either disable that
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100989 * module and provide your own implementations of the callbacks needed by
990 * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
991 * your own implementation of the whole module by setting
992 * \c MBEDTLS_TIMING_ALT in the current file.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000993 *
Andrzej Kurek57353692022-04-07 08:08:21 -0400994 * \note The timing module will include time.h on suitable platforms
995 * regardless of the setting of MBEDTLS_HAVE_TIME, unless
996 * MBEDTLS_TIMING_ALT is used. See timing.c for more information.
997 *
Manuel Pégourié-Gonnard02049dc2016-02-22 16:42:51 +0000998 * \note See also our Knowledge Base article about porting to a new
999 * environment:
Dave Rodgmanb3196842022-10-12 16:47:08 +01001000 * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
Manuel Pégourié-Gonnard02049dc2016-02-22 16:42:51 +00001001 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001002 * Module: library/timing.c
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001003 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001004#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001005
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001006/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001007 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001008 *
1009 * Enable run-time version information.
1010 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001011 * Module: library/version.c
1012 *
1013 * This module provides run-time version information.
1014 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001015#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00001016
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001017/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001018 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001019 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001020 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001021 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001022 * Module: library/x509.c
Simon Butcher2cb47392016-11-04 12:23:11 +00001023 * Caller: library/x509_crl.c
1024 * library/x509_crt.c
1025 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001026 *
Janos Follath277bba82024-11-19 16:14:00 +00001027 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C
Przemek Stekiel278b6672022-08-03 09:50:38 +02001028 *
Janos Follath277bba82024-11-19 16:14:00 +00001029 * \warning You must call psa_crypto_init() before doing any X.509 operation.
Paul Bakker5690efc2011-05-26 13:16:06 +00001030 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001031 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001032 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001033#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001034
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001035/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001036 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001037 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001038 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001039 *
Simon Butcher2cb47392016-11-04 12:23:11 +00001040 * Module: library/x509_crt.c
Ronald Cronde1adee2022-03-07 16:20:30 +01001041 * Caller: library/ssl_tls.c
1042 * library/ssl*_client.c
1043 * library/ssl*_server.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001044 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001045 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001046 *
1047 * This module is required for X.509 certificate parsing.
1048 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001049#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001050
1051/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001052 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001053 *
1054 * Enable X.509 CRL parsing.
1055 *
Simon Butcher2cb47392016-11-04 12:23:11 +00001056 * Module: library/x509_crl.c
1057 * Caller: library/x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001058 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001059 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001060 *
1061 * This module is required for X.509 CRL parsing.
1062 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001063#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001064
1065/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001066 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001067 *
1068 * Enable X.509 Certificate Signing Request (CSR) parsing.
1069 *
Simon Butcher2cb47392016-11-04 12:23:11 +00001070 * Module: library/x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001071 * Caller: library/x509_crt_write.c
1072 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001073 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001074 *
1075 * This module is used for reading X.509 certificate request.
1076 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001077#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001078
1079/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001080 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001081 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001082 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001083 *
1084 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001085 *
Przemek Stekiel10836a02022-08-19 08:45:34 +02001086 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
Przemek Stekiel278b6672022-08-03 09:50:38 +02001087 *
Janos Follath277bba82024-11-19 16:14:00 +00001088 * \warning You must call psa_crypto_init() before doing any X.509 operation.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001089 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001090 * This module is the basis for creating X.509 certificates and CSRs.
1091 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001092#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001093
1094/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001095 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001096 *
1097 * Enable creating X.509 certificates.
1098 *
1099 * Module: library/x509_crt_write.c
1100 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001101 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001102 *
1103 * This module is required for X.509 certificate creation.
1104 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001105#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001106
1107/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001108 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001109 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001110 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001111 *
1112 * Module: library/x509_csr_write.c
1113 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001114 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001115 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001116 * This module is required for X.509 certificate request writing.
1117 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001118#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001119
Gilles Peskinee820c0a2023-08-03 17:45:20 +02001120/** \} name SECTION: Mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001121
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001122/**
Gilles Peskineba4162a2022-04-11 17:04:38 +02001123 * \name SECTION: General configuration options
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001124 *
Gilles Peskined5793ce2022-04-13 23:05:10 +02001125 * This section contains Mbed TLS build settings that are not associated
1126 * with a particular module.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001127 *
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001128 * \{
1129 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001130
Gilles Peskinea02c1242022-03-16 17:03:19 +01001131/**
1132 * \def MBEDTLS_CONFIG_FILE
1133 *
1134 * If defined, this is a header which will be included instead of
1135 * `"mbedtls/mbedtls_config.h"`.
1136 * This header file specifies the compile-time configuration of Mbed TLS.
Gilles Peskineefffd642022-04-26 18:13:01 +02001137 * Unlike other configuration options, this one must be defined on the
1138 * compiler command line: a definition in `mbedtls_config.h` would have
1139 * no effect.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001140 *
Gilles Peskine6457ef92022-04-11 16:42:37 +02001141 * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
Gilles Peskinea02c1242022-03-16 17:03:19 +01001142 * non-standard feature of the C language, so this feature is only available
Gilles Peskine6457ef92022-04-11 16:42:37 +02001143 * with compilers that perform macro expansion on an <tt>\#include</tt> line.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001144 *
Gilles Peskine58ffcba2022-04-14 12:44:16 +02001145 * The value of this symbol is typically a path in double quotes, either
1146 * absolute or relative to a directory on the include search path.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001147 */
1148//#define MBEDTLS_CONFIG_FILE "mbedtls/mbedtls_config.h"
1149
1150/**
1151 * \def MBEDTLS_USER_CONFIG_FILE
1152 *
1153 * If defined, this is a header which will be included after
1154 * `"mbedtls/mbedtls_config.h"` or #MBEDTLS_CONFIG_FILE.
Gilles Peskinef68f43a2022-04-13 23:22:20 +02001155 * This allows you to modify the default configuration, including the ability
1156 * to undefine options that are enabled by default.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001157 *
Gilles Peskine6457ef92022-04-11 16:42:37 +02001158 * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
Gilles Peskinea02c1242022-03-16 17:03:19 +01001159 * non-standard feature of the C language, so this feature is only available
Gilles Peskine6457ef92022-04-11 16:42:37 +02001160 * with compilers that perform macro expansion on an <tt>\#include</tt> line.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001161 *
Gilles Peskine58ffcba2022-04-14 12:44:16 +02001162 * The value of this symbol is typically a path in double quotes, either
1163 * absolute or relative to a directory on the include search path.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001164 */
1165//#define MBEDTLS_USER_CONFIG_FILE "/dev/null"
1166
Gilles Peskineba4162a2022-04-11 17:04:38 +02001167/** \} name SECTION: General configuration options */
1168
1169/**
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001170 * \name SECTION: Module configuration options
1171 *
1172 * This section allows for the setting of module specific sizes and
1173 * configuration options. The default values are already present in the
1174 * relevant header files and should suffice for the regular use cases.
1175 *
1176 * Our advice is to enable options and change their values here
1177 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001178 * \{
1179 */
Gilles Peskine3f49cc12022-04-13 23:21:16 +02001180/* The Doxygen documentation here is used when a user comments out a
1181 * setting and runs doxygen themselves. On the other hand, when we typeset
1182 * the full documentation including disabled settings, the documentation
1183 * in specific modules' header files is used if present. When editing this
1184 * file, make sure that each option is documented in exactly one place,
1185 * plus optionally a same-line Doxygen comment here if there is a Doxygen
1186 * comment in the specific module. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001187
Paul Bakker088c5c52014-04-25 11:11:10 +02001188/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001189//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1190//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker6e339b52013-07-03 13:37:05 +02001191
Paul Bakker088c5c52014-04-25 11:11:10 +02001192/* SSL options */
Angus Grattond8213d02016-05-25 20:56:48 +10001193
Angus Grattond8213d02016-05-25 20:56:48 +10001194/** \def MBEDTLS_SSL_IN_CONTENT_LEN
1195 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001196 * Maximum length (in bytes) of incoming plaintext fragments.
Angus Grattond8213d02016-05-25 20:56:48 +10001197 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001198 * This determines the size of the incoming TLS I/O buffer in such a way
1199 * that it is capable of holding the specified amount of plaintext data,
1200 * regardless of the protection mechanism used.
1201 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001202 * \note When using a value less than the default of 16KB on the client, it is
1203 * recommended to use the Maximum Fragment Length (MFL) extension to
1204 * inform the server about this limitation. On the server, there
1205 * is no supported, standardized way of informing the client about
1206 * restriction on the maximum size of incoming messages, and unless
1207 * the limitation has been communicated by other means, it is recommended
1208 * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
1209 * while keeping the default value of 16KB for the incoming buffer.
1210 *
David Horstmann95d516f2021-05-04 18:36:56 +01001211 * Uncomment to set the maximum plaintext size of the incoming I/O buffer.
Angus Grattond8213d02016-05-25 20:56:48 +10001212 */
1213//#define MBEDTLS_SSL_IN_CONTENT_LEN 16384
1214
Gilles Peskined3d02902020-03-04 21:35:27 +01001215/** \def MBEDTLS_SSL_CID_IN_LEN_MAX
1216 *
1217 * The maximum length of CIDs used for incoming DTLS messages.
1218 *
1219 */
1220//#define MBEDTLS_SSL_CID_IN_LEN_MAX 32
1221
1222/** \def MBEDTLS_SSL_CID_OUT_LEN_MAX
1223 *
1224 * The maximum length of CIDs used for outgoing DTLS messages.
1225 *
1226 */
1227//#define MBEDTLS_SSL_CID_OUT_LEN_MAX 32
1228
TRodziewicze8dd7092021-05-12 14:19:11 +02001229/** \def MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
Gilles Peskined3d02902020-03-04 21:35:27 +01001230 *
1231 * This option controls the use of record plaintext padding
TRodziewicz1e660ed2021-05-26 17:08:54 +02001232 * in TLS 1.3 and when using the Connection ID extension in DTLS 1.2.
Hanno Becker13996922020-05-28 16:15:19 +01001233 *
1234 * The padding will always be chosen so that the length of the
1235 * padded plaintext is a multiple of the value of this option.
1236 *
1237 * Note: A value of \c 1 means that no padding will be used
1238 * for outgoing records.
1239 *
1240 * Note: On systems lacking division instructions,
1241 * a power of two should be preferred.
1242 */
TRodziewicze8dd7092021-05-12 14:19:11 +02001243//#define MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 16
Hanno Becker13996922020-05-28 16:15:19 +01001244
Angus Grattond8213d02016-05-25 20:56:48 +10001245/** \def MBEDTLS_SSL_OUT_CONTENT_LEN
1246 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001247 * Maximum length (in bytes) of outgoing plaintext fragments.
Angus Grattond8213d02016-05-25 20:56:48 +10001248 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001249 * This determines the size of the outgoing TLS I/O buffer in such a way
1250 * that it is capable of holding the specified amount of plaintext data,
1251 * regardless of the protection mechanism used.
1252 *
Angus Grattond8213d02016-05-25 20:56:48 +10001253 * It is possible to save RAM by setting a smaller outward buffer, while keeping
1254 * the default inward 16384 byte buffer to conform to the TLS specification.
1255 *
1256 * The minimum required outward buffer size is determined by the handshake
1257 * protocol's usage. Handshaking will fail if the outward buffer is too small.
1258 * The specific size requirement depends on the configured ciphers and any
1259 * certificate data which is sent during the handshake.
1260 *
David Horstmann95d516f2021-05-04 18:36:56 +01001261 * Uncomment to set the maximum plaintext size of the outgoing I/O buffer.
Angus Grattond8213d02016-05-25 20:56:48 +10001262 */
1263//#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384
1264
Hanno Beckere0b150f2018-08-21 15:51:03 +01001265/** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING
1266 *
1267 * Maximum number of heap-allocated bytes for the purpose of
1268 * DTLS handshake message reassembly and future message buffering.
1269 *
Yuto Takano7828ca22021-08-10 11:26:15 +01001270 * This should be at least 9/8 * MBEDTLS_SSL_IN_CONTENT_LEN
Hanno Becker28007512018-08-28 09:46:44 +01001271 * to account for a reassembled handshake message of maximum size,
1272 * together with its reassembly bitmap.
1273 *
Hanno Becker97a1c132018-08-28 14:42:15 +01001274 * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default)
Hanno Becker28007512018-08-28 09:46:44 +01001275 * should be sufficient for all practical situations as it allows
1276 * to reassembly a large handshake message (such as a certificate)
1277 * while buffering multiple smaller handshake messages.
1278 *
Hanno Beckere0b150f2018-08-21 15:51:03 +01001279 */
Hanno Becker159a37f2018-08-24 15:07:29 +01001280//#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
Hanno Beckere0b150f2018-08-21 15:51:03 +01001281
Ronald Cron1aa6e8d2023-02-23 09:46:54 +01001282//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 or 384 bits) */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001283//#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001284
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02001285/**
1286 * Complete list of ciphersuites to use, in order of preference.
1287 *
1288 * \warning No dependency checking is done on that field! This option can only
1289 * be used to restrict the set of available ciphersuites. It is your
1290 * responsibility to make sure the needed modules are active.
1291 *
1292 * Use this to save a few hundred bytes of ROM (default ordering of all
1293 * available ciphersuites) and a few to a few hundred bytes of RAM.
1294 *
1295 * The value below is only an example, not the default.
1296 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001297//#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02001298
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001299/**
Tom Cosgrovea63775b2023-09-14 13:31:19 +01001300 * \def MBEDTLS_SSL_MAX_EARLY_DATA_SIZE
1301 *
1302 * The default maximum amount of 0-RTT data. See the documentation of
Yanray Wang07517612023-11-07 11:47:36 +08001303 * \c mbedtls_ssl_conf_max_early_data_size() for more information.
Tom Cosgrovea63775b2023-09-14 13:31:19 +01001304 *
1305 * It must be positive and smaller than UINT32_MAX.
1306 *
1307 * If MBEDTLS_SSL_EARLY_DATA is not defined, this default value does not
1308 * have any impact on the build.
Tom Cosgrovea63775b2023-09-14 13:31:19 +01001309 */
1310//#define MBEDTLS_SSL_MAX_EARLY_DATA_SIZE 1024
1311
1312/**
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001313 * \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
1314 *
Jerry Yucf913512023-11-14 11:06:52 +08001315 * Maximum allowed ticket age difference in milliseconds tolerated between
Jerry Yu034a8b72023-11-10 12:20:19 +08001316 * server and client. Default value is 6000. This is not used in TLS 1.2.
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001317 *
Jerry Yu034a8b72023-11-10 12:20:19 +08001318 * - The client ticket age is the time difference between the time when the
1319 * client proposes to the server to use the ticket and the time the client
1320 * received the ticket from the server.
1321 * - The server ticket age is the time difference between the time when the
1322 * server receives a proposition from the client to use the ticket and the
1323 * time when the ticket was created by the server.
1324 *
Jerry Yucf913512023-11-14 11:06:52 +08001325 * The ages might be different due to the client and server clocks not running
1326 * at the same pace. The typical accuracy of an RTC crystal is ±100 to ±20 parts
1327 * per million (360 to 72 milliseconds per hour). Default tolerance window is
1328 * 6s, thus in the worst case clients and servers must sync up their system time
1329 * every 6000/360/2~=8 hours.
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001330 *
Jerry Yu04fceb72023-11-15 09:52:46 +08001331 * See section 8.3 of the TLS 1.3 specification(RFC 8446) for more information.
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001332 */
Gilles Peskined65ea422023-09-05 21:07:32 +02001333//#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001334
1335/**
1336 * \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH
1337 *
1338 * Size in bytes of a ticket nonce. This is not used in TLS 1.2.
1339 *
1340 * This must be less than 256.
1341 */
Gilles Peskined65ea422023-09-05 21:07:32 +02001342//#define MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH 32
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001343
1344/**
1345 * \def MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS
1346 *
1347 * Default number of NewSessionTicket messages to be sent by a TLS 1.3 server
1348 * after handshake completion. This is not used in TLS 1.2 and relevant only if
1349 * the MBEDTLS_SSL_SESSION_TICKETS option is enabled.
1350 *
1351 */
Gilles Peskined65ea422023-09-05 21:07:32 +02001352//#define MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS 1
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001353
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01001354/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001355//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
Andres AGf9113192016-09-02 14:06:04 +01001356//#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01001357
Gilles Peskine611179c2022-04-13 23:04:48 +02001358/** \} name SECTION: Module configuration options */