blob: e5c6ee695315a4096414fb81c88414f77bf489b2 [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/**
Gilles Peskinee820c0a2023-08-03 17:45:20 +020025 * \name SECTION: Mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +000026 *
27 * This section sets support for features that are or are not needed
28 * within the modules that are enabled.
29 * \{
30 */
Paul Bakker5121ce52009-01-03 21:22:43 +000031
Paul Bakkerf3b86c12011-01-27 15:24:17 +000032/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020033 * \def MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +010034 *
TRodziewiczd8540832021-06-10 15:16:50 +020035 * Uncomment to provide your own alternate implementation for
Manuel Pégourié-Gonnarda63bc942015-05-14 18:22:47 +020036 * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
Paul Bakkerf2561b32014-02-06 15:11:55 +010037 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020038 * Only works if you have MBEDTLS_TIMING_C enabled.
Paul Bakkerf2561b32014-02-06 15:11:55 +010039 *
40 * You will need to provide a header "timing_alt.h" and an implementation at
41 * compile time.
42 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020043//#define MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +010044
Paul Bakker90995b52013-06-24 19:20:35 +020045/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020046 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020047 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020048 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020049 *
Paul Bakkere07f41d2013-04-19 09:08:57 +020050 * This enables the following ciphersuites (if other requisites are
51 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020052 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
53 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
54 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
55 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
56 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
57 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
58 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
59 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
60 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
61 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020062 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020063#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +020064
65/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020066 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +020067 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020068 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +020069 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020070 * Requires: MBEDTLS_DHM_C
Paul Bakkere07f41d2013-04-19 09:08:57 +020071 *
72 * This enables the following ciphersuites (if other requisites are
73 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020074 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
75 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
76 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
77 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
78 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
79 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
80 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
81 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
82 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
83 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
Hanno Beckera2f6b722017-09-28 10:33:29 +010084 *
Hanno Beckerf9734b32017-10-03 12:09:22 +010085 * \warning Using DHE constitutes a security risk as it
86 * is not possible to validate custom DH parameters.
87 * If possible, it is recommended users should consider
88 * preferring other methods of key exchange.
89 * See dhm.h for more details.
Hanno Beckera2f6b722017-09-28 10:33:29 +010090 *
Paul Bakkere07f41d2013-04-19 09:08:57 +020091 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020092#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +020093
94/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020095 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +020096 *
97 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
98 *
Janos Follath277bba82024-11-19 16:14:00 +000099 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200100 *
101 * This enables the following ciphersuites (if other requisites are
102 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200103 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
104 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
105 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
106 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
107 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
108 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200109 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200110#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200111
112/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200113 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200114 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200115 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200116 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200117 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
118 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200119 *
120 * This enables the following ciphersuites (if other requisites are
121 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200122 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
123 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
124 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
125 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
126 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
127 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
128 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
129 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
130 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
131 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
132 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
133 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200134 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200135#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200136
137/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200138 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200139 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200140 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200141 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200142 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
143 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200144 *
145 * This enables the following ciphersuites (if other requisites are
146 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200147 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
148 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
149 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
150 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
151 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
152 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
153 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
154 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
155 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
156 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
157 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
158 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Hanno Beckera2f6b722017-09-28 10:33:29 +0100159 *
Hanno Beckerf9734b32017-10-03 12:09:22 +0100160 * \warning Using DHE constitutes a security risk as it
161 * is not possible to validate custom DH parameters.
162 * If possible, it is recommended users should consider
163 * preferring other methods of key exchange.
164 * See dhm.h for more details.
Hanno Beckera2f6b722017-09-28 10:33:29 +0100165 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200166 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200167#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200168
169/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200170 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200171 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200172 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200173 *
Janos Follath277bba82024-11-19 16:14:00 +0000174 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200175 * MBEDTLS_RSA_C
176 * MBEDTLS_PKCS1_V15
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200177 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200178 *
179 * This enables the following ciphersuites (if other requisites are
180 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200181 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
182 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
183 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
184 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
185 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
186 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
187 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
188 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
189 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
190 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakkere07f41d2013-04-19 09:08:57 +0200191 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200192#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200193
194/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200195 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200196 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200197 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200198 *
Janos Follath277bba82024-11-19 16:14:00 +0000199 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
200 * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200201 * MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200202 *
203 * This enables the following ciphersuites (if other requisites are
204 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200205 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
206 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
207 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
208 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
209 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
210 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
211 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
212 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
213 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
214 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200215 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200216#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200217
218/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200219 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100220 *
221 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
222 *
Janos Follath277bba82024-11-19 16:14:00 +0000223 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
224 * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200225 * MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100226 *
227 * This enables the following ciphersuites (if other requisites are
228 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200229 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
230 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
231 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
232 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
233 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
234 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
235 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
236 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
237 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
238 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100239 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200240#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100241
242/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200243 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100244 *
245 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
246 *
Janos Follath277bba82024-11-19 16:14:00 +0000247 * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200248 * MBEDTLS_RSA_C
249 * MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100250 *
251 * This enables the following ciphersuites (if other requisites are
252 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200253 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
254 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
255 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
256 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
257 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
258 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
259 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
260 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
261 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
262 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100263 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200264#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100265
266/**
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200267 * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
268 *
269 * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
270 *
Manuel Pégourié-Gonnard75df9022015-09-16 23:21:01 +0200271 * \warning This is currently experimental. EC J-PAKE support is based on the
272 * Thread v1.0.0 specification; incompatible changes to the specification
273 * might still happen. For this reason, this is disabled by default.
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200274 *
Janos Follath277bba82024-11-19 16:14:00 +0000275 * Requires: MBEDTLS_ECJPAKE_C or PSA_WANT_ALG_JPAKE
Manuel Pégourié-Gonnard41bc8b62023-03-14 23:59:24 +0100276 * SHA-256 (via MBEDTLS_SHA256_C or a PSA driver)
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200277 * MBEDTLS_ECP_DP_SECP256R1_ENABLED
278 *
279 * This enables the following ciphersuites (if other requisites are
280 * enabled as well):
281 * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
282 */
Manuel Pégourié-Gonnardcf828932015-10-20 14:57:00 +0200283//#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
Manuel Pégourié-Gonnard557535d2015-09-15 17:53:32 +0200284
285/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200286 * \def MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100287 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200288 * Enable a dummy error function to make use of mbedtls_strerror() in
289 * third party libraries easier when MBEDTLS_ERROR_C is disabled
290 * (no effect when MBEDTLS_ERROR_C is enabled).
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200291 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200292 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
293 * not using mbedtls_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100294 *
295 * Disable if you run into name conflicts and want to really remove the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200296 * mbedtls_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100297 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200298#define MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100299
300/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200301 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100302 *
303 * Enable sending of alert messages in case of encountered errors as per RFC.
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200304 * If you choose not to send the alert messages, Mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100305 * with other servers, only debugging of failures is harder.
306 *
307 * The advantage of not sending alert messages, is that no information is given
308 * about reasons for failures thus preventing adversaries of gaining intel.
309 *
310 * Enable sending of all alert messages
311 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200312#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100313
314/**
Gilles Peskined3d02902020-03-04 21:35:27 +0100315 * \def MBEDTLS_SSL_DTLS_CONNECTION_ID
316 *
Hannes Tschofenige2c46e02022-11-23 10:44:11 +0100317 * Enable support for the DTLS Connection ID (CID) extension,
Gilles Peskined3d02902020-03-04 21:35:27 +0100318 * which allows to identify DTLS connections across changes
Hannes Tschofenige2c46e02022-11-23 10:44:11 +0100319 * in the underlying transport. The CID functionality is described
320 * in RFC 9146.
Gilles Peskined3d02902020-03-04 21:35:27 +0100321 *
322 * Setting this option enables the SSL APIs `mbedtls_ssl_set_cid()`,
Paul Elliott0113cf12022-03-11 20:26:47 +0000323 * mbedtls_ssl_get_own_cid()`, `mbedtls_ssl_get_peer_cid()` and
324 * `mbedtls_ssl_conf_cid()`. See the corresponding documentation for
325 * more information.
Gilles Peskined3d02902020-03-04 21:35:27 +0100326 *
Gilles Peskined3d02902020-03-04 21:35:27 +0100327 * The maximum lengths of outgoing and incoming CIDs can be configured
328 * through the options
329 * - MBEDTLS_SSL_CID_OUT_LEN_MAX
330 * - MBEDTLS_SSL_CID_IN_LEN_MAX.
331 *
332 * Requires: MBEDTLS_SSL_PROTO_DTLS
333 *
334 * Uncomment to enable the Connection ID extension.
335 */
Hannes Tschofenigfd6cca42021-10-12 09:22:33 +0200336#define MBEDTLS_SSL_DTLS_CONNECTION_ID
337
338
339/**
340 * \def MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT
341 *
342 * Defines whether RFC 9146 (default) or the legacy version
343 * (version draft-ietf-tls-dtls-connection-id-05,
344 * https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05)
345 * is used.
346 *
347 * Set the value to 0 for the standard version, and
348 * 1 for the legacy draft version.
349 *
Hannes Tschofenige2c46e02022-11-23 10:44:11 +0100350 * \deprecated Support for the legacy version of the DTLS
351 * Connection ID feature is deprecated. Please
352 * switch to the standardized version defined
353 * in RFC 9146 enabled by utilizing
354 * MBEDTLS_SSL_DTLS_CONNECTION_ID without use
355 * of MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT.
356 *
Hannes Tschofenigfd6cca42021-10-12 09:22:33 +0200357 * Requires: MBEDTLS_SSL_DTLS_CONNECTION_ID
358 */
359#define MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 0
Gilles Peskined3d02902020-03-04 21:35:27 +0100360
361/**
Gilles Peskineb74a1c72018-04-24 13:09:22 +0200362 * \def MBEDTLS_SSL_ASYNC_PRIVATE
363 *
364 * Enable asynchronous external private key operations in SSL. This allows
365 * you to configure an SSL connection to call an external cryptographic
366 * module to perform private key operations instead of performing the
367 * operation inside the library.
368 *
Valerio Setti8841d6b2023-01-05 08:40:24 +0100369 * Requires: MBEDTLS_X509_CRT_PARSE_C
Gilles Peskineb74a1c72018-04-24 13:09:22 +0200370 */
Jaeden Amerod9c71da2018-06-15 20:31:26 +0100371//#define MBEDTLS_SSL_ASYNC_PRIVATE
Gilles Peskineb74a1c72018-04-24 13:09:22 +0200372
373/**
Gilles Peskined3d02902020-03-04 21:35:27 +0100374 * \def MBEDTLS_SSL_CONTEXT_SERIALIZATION
375 *
376 * Enable serialization of the TLS context structures, through use of the
377 * functions mbedtls_ssl_context_save() and mbedtls_ssl_context_load().
378 *
379 * This pair of functions allows one side of a connection to serialize the
380 * context associated with the connection, then free or re-use that context
381 * while the serialized state is persisted elsewhere, and finally deserialize
382 * that state to a live context for resuming read/write operations on the
383 * connection. From a protocol perspective, the state of the connection is
384 * unaffected, in particular this is entirely transparent to the peer.
385 *
386 * Note: this is distinct from TLS session resumption, which is part of the
387 * protocol and fully visible by the peer. TLS session resumption enables
388 * establishing new connections associated to a saved session with shorter,
389 * lighter handshakes, while context serialization is a local optimization in
390 * handling a single, potentially long-lived connection.
391 *
392 * Enabling these APIs makes some SSL structures larger, as 64 extra bytes are
393 * saved after the handshake to allow for more efficient serialization, so if
394 * you don't need this feature you'll save RAM by disabling it.
395 *
Przemek Stekiel460192e2022-10-03 08:55:29 +0200396 * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C
397 *
Gilles Peskined3d02902020-03-04 21:35:27 +0100398 * Comment to disable the context serialization APIs.
399 */
400#define MBEDTLS_SSL_CONTEXT_SERIALIZATION
401
402/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200403 * \def MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100404 *
405 * Enable the debug messages in SSL module for all issues.
406 * Debug messages have been disabled in some places to prevent timing
407 * attacks due to (unbalanced) debugging function calls.
408 *
409 * If you need all error reporting you should enable this during debugging,
410 * but remove this for production servers that should log as well.
411 *
412 * Uncomment this macro to report all debug messages on errors introducing
413 * a timing side-channel.
414 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100415 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200416//#define MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100417
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200418/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100419 *
420 * Enable support for Encrypt-then-MAC, RFC 7366.
421 *
422 * This allows peers that both support it to use a more robust protection for
423 * ciphersuites using CBC, providing deep resistance against timing attacks
424 * on the padding or underlying cipher.
425 *
426 * This only affects CBC ciphersuites, and is useless if none is defined.
427 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200428 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100429 *
430 * Comment this macro to disable support for Encrypt-then-MAC
431 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200432#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100433
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200434/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200435 *
Manuel Pégourié-Gonnardbca8aa02020-03-24 12:11:49 +0100436 * Enable support for RFC 7627: Session Hash and Extended Master Secret
437 * Extension.
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200438 *
Shaun Case8b0ecbc2021-12-20 21:14:10 -0800439 * This was introduced as "the proper fix" to the Triple Handshake family of
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200440 * attacks, but it is recommended to always use it (even if you disable
441 * renegotiation), since it actually fixes a more fundamental issue in the
442 * original SSL/TLS design, and has implications beyond Triple Handshake.
443 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200444 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100445 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200446 * Comment this macro to disable support for Extended Master Secret.
447 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200448#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200449
Paul Bakkerd66f0702013-01-31 16:57:45 +0100450/**
Hanno Beckerbb278f52019-02-05 17:04:00 +0000451 * \def MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
452 *
Hanno Beckerfd7f2982019-02-25 10:13:33 +0000453 * This option controls the availability of the API mbedtls_ssl_get_peer_cert()
Hanno Beckerbb278f52019-02-05 17:04:00 +0000454 * giving access to the peer's certificate after completion of the handshake.
455 *
456 * Unless you need mbedtls_ssl_peer_cert() in your application, it is
457 * recommended to disable this option for reduced RAM usage.
458 *
459 * \note If this option is disabled, mbedtls_ssl_get_peer_cert() is still
460 * defined, but always returns \c NULL.
461 *
462 * \note This option has no influence on the protection against the
463 * triple handshake attack. Even if it is disabled, Mbed TLS will
464 * still ensure that certificates do not change during renegotiation,
Shaun Case8b0ecbc2021-12-20 21:14:10 -0800465 * for example by keeping a hash of the peer's certificate.
Hanno Beckerbb278f52019-02-05 17:04:00 +0000466 *
Tom Cosgroveafb2fe12022-06-29 16:36:12 +0100467 * \note This option is required if MBEDTLS_SSL_PROTO_TLS1_3 is set.
Hanno Beckerbb278f52019-02-05 17:04:00 +0000468 *
469 * Comment this macro to disable storing the peer's certificate
470 * after the handshake.
471 */
472#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
473
474/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200475 * \def MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100476 *
Hanno Becker0eb8fb82018-10-26 09:53:16 +0100477 * Enable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100478 *
479 * The two main uses of renegotiation are (1) refresh keys on long-lived
480 * connections and (2) client authentication after the initial handshake.
481 * If you don't need renegotiation, it's probably better to disable it, since
482 * it has been associated with security issues in the past and is easy to
483 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100484 *
jnmeurisse83f0a652023-09-16 18:12:18 +0200485 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
486 *
Manuel Pégourié-Gonnard55f968b2015-03-09 16:23:15 +0000487 * Comment this to disable support for renegotiation.
Hanno Becker6851b102017-10-12 14:57:48 +0100488 *
489 * \note Even if this option is disabled, both client and server are aware
490 * of the Renegotiation Indication Extension (RFC 5746) used to
491 * prevent the SSL renegotiation attack (see RFC 5746 Sect. 1).
492 * (See \c mbedtls_ssl_conf_legacy_renegotiation for the
493 * configuration of this extension).
494 *
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100495 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200496#define MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100497
498/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200499 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200500 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200501 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200502 *
503 * Comment this macro to disable support for the max_fragment_length extension
504 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200505#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200506
507/**
Jan Bruckner151f6422023-02-10 12:45:19 +0100508 * \def MBEDTLS_SSL_RECORD_SIZE_LIMIT
509 *
Jan Brucknera0589e72023-03-15 11:04:45 +0100510 * Enable support for RFC 8449 record_size_limit extension in SSL (TLS 1.3 only).
Jan Bruckner151f6422023-02-10 12:45:19 +0100511 *
Jan Bruckner151f6422023-02-10 12:45:19 +0100512 * Requires: MBEDTLS_SSL_PROTO_TLS1_3
513 *
514 * Uncomment this macro to enable support for the record_size_limit extension
515 */
516//#define MBEDTLS_SSL_RECORD_SIZE_LIMIT
517
518/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200519 * \def MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200520 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100521 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200522 *
Janos Follath277bba82024-11-19 16:14:00 +0000523 * Requires: PSA_WANT_ALG_SHA_256 or PSA_WANT_ALG_SHA_384
Andrzej Kureke02da812022-08-17 17:04:49 -0400524 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100525 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200526 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200527#define MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200528
529/**
Ronald Cron6f135e12021-12-08 16:57:54 +0100530 * \def MBEDTLS_SSL_PROTO_TLS1_3
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100531 *
Ronald Cron6f135e12021-12-08 16:57:54 +0100532 * Enable support for TLS 1.3.
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100533 *
Gilles Peskineda69eaa2023-09-05 20:54:17 +0200534 * \note See docs/architecture/tls13-support.md for a description of the TLS
Ronald Cron6f135e12021-12-08 16:57:54 +0100535 * 1.3 support that this option enables.
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100536 *
Tom Cosgroveafb2fe12022-06-29 16:36:12 +0100537 * Requires: MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
Manuel Pégourié-Gonnard3e830982022-05-11 13:27:44 +0200538 * Requires: MBEDTLS_PSA_CRYPTO_C
Ronald Cron6f135e12021-12-08 16:57:54 +0100539 *
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100540 * Uncomment this macro to enable the support for TLS 1.3.
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100541 */
Ronald Cron27eb68d2024-03-15 16:13:37 +0100542#define MBEDTLS_SSL_PROTO_TLS1_3
Hanno Becker9fc15ea2020-05-04 12:00:47 +0100543
544/**
Ronald Cronab65c522021-11-24 10:47:20 +0100545 * \def MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
546 *
547 * Enable TLS 1.3 middlebox compatibility mode.
548 *
549 * As specified in Section D.4 of RFC 8446, TLS 1.3 offers a compatibility
550 * mode to make a TLS 1.3 connection more likely to pass through middle boxes
551 * expecting TLS 1.2 traffic.
552 *
553 * Turning on the compatibility mode comes at the cost of a few added bytes
554 * on the wire, but it doesn't affect compatibility with TLS 1.3 implementations
555 * that don't use it. Therefore, unless transmission bandwidth is critical and
556 * you know that middlebox compatibility issues won't occur, it is therefore
557 * recommended to set this option.
558 *
559 * Comment to disable compatibility mode for TLS 1.3. If
Ronald Cron6f135e12021-12-08 16:57:54 +0100560 * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
561 * effect on the build.
Ronald Cronab65c522021-11-24 10:47:20 +0100562 *
563 */
Ronald Cron27eb68d2024-03-15 16:13:37 +0100564#define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
Ronald Cronab65c522021-11-24 10:47:20 +0100565
566/**
Ronald Crond8d2ea52022-10-04 15:48:06 +0200567 * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
568 *
569 * Enable TLS 1.3 PSK key exchange mode.
570 *
571 * Comment to disable support for the PSK key exchange mode in TLS 1.3. If
572 * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
573 * effect on the build.
574 *
575 */
576#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
577
578/**
579 * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
580 *
581 * Enable TLS 1.3 ephemeral key exchange mode.
582 *
Przemek Stekielce05f542023-06-15 16:44:08 +0200583 * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200584 * MBEDTLS_X509_CRT_PARSE_C
585 * and at least one of:
Janos Follath277bba82024-11-19 16:14:00 +0000586 * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA
Manuel Pégourié-Gonnard4fa702a2023-03-29 12:15:24 +0200587 * MBEDTLS_PKCS1_V21
Ronald Crond8d2ea52022-10-04 15:48:06 +0200588 *
589 * Comment to disable support for the ephemeral key exchange mode in TLS 1.3.
590 * If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any
591 * effect on the build.
592 *
593 */
594#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
595
596/**
597 * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
598 *
599 * Enable TLS 1.3 PSK ephemeral key exchange mode.
600 *
Przemek Stekielce05f542023-06-15 16:44:08 +0200601 * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH
Ronald Crond8d2ea52022-10-04 15:48:06 +0200602 *
603 * Comment to disable support for the PSK ephemeral key exchange mode in
604 * TLS 1.3. If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not
605 * have any effect on the build.
606 *
607 */
608#define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
609
610/**
Gilles Peskine449bd832023-01-11 14:50:10 +0100611 * \def MBEDTLS_SSL_EARLY_DATA
612 *
613 * Enable support for RFC 8446 TLS 1.3 early data.
614 *
615 * Requires: MBEDTLS_SSL_SESSION_TICKETS and either
616 * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED or
617 * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
618 *
619 * Comment this to disable support for early data. If MBEDTLS_SSL_PROTO_TLS1_3
620 * is not enabled, this option does not have any effect on the build.
621 *
Tom Cosgrovea63775b2023-09-14 13:31:19 +0100622 * \note The maximum amount of early data can be set with
623 * MBEDTLS_SSL_MAX_EARLY_DATA_SIZE.
624 *
Gilles Peskine449bd832023-01-11 14:50:10 +0100625 */
Ronald Cronc2e110f2022-11-22 09:01:46 +0100626//#define MBEDTLS_SSL_EARLY_DATA
Xiaokang Qian54413b12022-10-20 05:57:03 +0000627
628/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200629 * \def MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100630 *
631 * Enable support for DTLS (all available versions).
632 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200633 * Enable this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100634 *
TRodziewicz0f82ec62021-05-12 17:49:18 +0200635 * Requires: MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100636 *
637 * Comment this macro to disable support for DTLS
638 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200639#define MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +0100640
641/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200642 * \def MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200643 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +0100644 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200645 *
Paul Bakker27e36d32014-04-08 12:33:37 +0200646 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200647 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200648#define MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200649
650/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200651 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200652 *
653 * Enable support for the anti-replay mechanism in DTLS.
654 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200655 * Requires: MBEDTLS_SSL_TLS_C
656 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200657 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +0200658 * \warning Disabling this is often a security risk!
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +0200659 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +0200660 *
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200661 * Comment this to disable anti-replay in DTLS.
662 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200663#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +0200664
665/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200666 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +0200667 *
668 * Enable support for HelloVerifyRequest on DTLS servers.
669 *
670 * This feature is highly recommended to prevent DTLS servers being used as
671 * amplifiers in DoS attacks against other hosts. It should always be enabled
672 * unless you know for sure amplification cannot be a problem in the
673 * environment in which your server operates.
674 *
Andrzej Kurek5c65c572022-04-13 14:28:52 -0400675 * \warning Disabling this can be a security risk! (see above)
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +0200676 *
Manuel Pégourié-Gonnarde057d3b2015-05-20 10:59:43 +0200677 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +0200678 *
679 * Comment this to disable support for HelloVerifyRequest.
680 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200681#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +0200682
683/**
Johan Pascalb62bb512015-12-03 21:56:45 +0100684 * \def MBEDTLS_SSL_DTLS_SRTP
685 *
Tobias Nießen1e8ca122021-05-10 19:53:15 +0200686 * Enable support for negotiation of DTLS-SRTP (RFC 5764)
Johan Pascal842d6712020-09-23 13:34:40 +0200687 * through the use_srtp extension.
688 *
689 * \note This feature provides the minimum functionality required
690 * to negotiate the use of DTLS-SRTP and to allow the derivation of
691 * the associated SRTP packet protection key material.
692 * In particular, the SRTP packet protection itself, as well as the
693 * demultiplexing of RTP and DTLS packets at the datagram layer
694 * (see Section 5 of RFC 5764), are not handled by this feature.
695 * Instead, after successful completion of a handshake negotiating
696 * the use of DTLS-SRTP, the extended key exporter API
Hanno Becker2d6e6f82021-05-24 10:58:31 +0100697 * mbedtls_ssl_conf_export_keys_cb() should be used to implement
Johan Pascal842d6712020-09-23 13:34:40 +0200698 * the key exporter described in Section 4.2 of RFC 5764 and RFC 5705
699 * (this is implemented in the SSL example programs).
700 * The resulting key should then be passed to an SRTP stack.
701 *
702 * Setting this option enables the runtime API
703 * mbedtls_ssl_conf_dtls_srtp_protection_profiles()
704 * through which the supported DTLS-SRTP protection
705 * profiles can be configured. You must call this API at
706 * runtime if you wish to negotiate the use of DTLS-SRTP.
Johan Pascalb62bb512015-12-03 21:56:45 +0100707 *
708 * Requires: MBEDTLS_SSL_PROTO_DTLS
709 *
Ron Eldor9cfb5eb2018-12-10 15:30:14 +0200710 * Uncomment this to enable support for use_srtp extension.
Johan Pascalb62bb512015-12-03 21:56:45 +0100711 */
Ron Eldor9cfb5eb2018-12-10 15:30:14 +0200712//#define MBEDTLS_SSL_DTLS_SRTP
Johan Pascalb62bb512015-12-03 21:56:45 +0100713
714/**
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +0200715 * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
716 *
717 * Enable server-side support for clients that reconnect from the same port.
718 *
719 * Some clients unexpectedly close the connection and try to reconnect using the
720 * same source port. This needs special support from the server to handle the
Simon Butcher4f6882a2015-09-11 17:12:46 +0100721 * new connection securely, as described in section 4.2.8 of RFC 6347. This
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +0200722 * flag enables that support.
723 *
Manuel Pégourié-Gonnard62c74bb2015-09-08 17:50:29 +0200724 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard62c74bb2015-09-08 17:50:29 +0200725 *
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +0200726 * Comment this to disable support for clients reusing the source port.
727 */
728#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
729
730/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200731 * \def MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +0200732 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200733 * Enable support for RFC 5077 session tickets in SSL.
Antonin Décimo36e89b52019-01-23 15:24:37 +0100734 * Client-side, provides full support for session tickets (maintenance of a
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +0200735 * session store remains the responsibility of the application, though).
736 * Server-side, you also need to provide callbacks for writing and parsing
737 * tickets, including authenticated encryption and key management. Example
738 * callbacks are provided by MBEDTLS_SSL_TICKET_C.
Paul Bakkera503a632013-08-14 13:48:06 +0200739 *
740 * Comment this macro to disable support for SSL session tickets
741 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200742#define MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +0200743
744/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200745 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +0200746 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200747 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200748 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200749 * Requires: MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +0000750 *
Paul Bakker0be444a2013-08-27 21:55:01 +0200751 * Comment this macro to disable support for server name indication in SSL
752 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200753#define MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +0200754
755/**
Gilles Peskinef03bd812020-03-23 18:13:58 +0100756 * \def MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
757 *
Andrzej Kurek2a54a6f2021-01-07 08:13:49 -0500758 * When this option is enabled, the SSL buffer will be resized automatically
759 * based on the negotiated maximum fragment length in each direction.
Andrzej Kurek557289b2020-10-21 15:12:39 +0200760 *
761 * Requires: MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Gilles Peskinef03bd812020-03-23 18:13:58 +0100762 */
763//#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
764
765/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200766 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200767 *
768 * Allow run-time checking of compile-time enabled features. Thus allowing users
769 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200770 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200771 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200772 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200773 *
774 * Comment this to disable run-time checking and save ROM space
775 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200776#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200777
778/**
Hanno Becker288dedc2019-03-27 11:00:53 +0000779 * \def MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
780 *
Jarno Lamsaf49fedc2019-04-01 14:58:30 +0300781 * If set, this enables the X.509 API `mbedtls_x509_crt_verify_with_ca_cb()`
Hanno Becker288dedc2019-03-27 11:00:53 +0000782 * and the SSL API `mbedtls_ssl_conf_ca_cb()` which allow users to configure
783 * the set of trusted certificates through a callback instead of a linked
784 * list.
785 *
786 * This is useful for example in environments where a large number of trusted
787 * certificates is present and storing them in a linked list isn't efficient
788 * enough, or when the set of trusted certificates changes frequently.
789 *
Jarno Lamsaf49fedc2019-04-01 14:58:30 +0300790 * See the documentation of `mbedtls_x509_crt_verify_with_ca_cb()` and
Hanno Becker288dedc2019-03-27 11:00:53 +0000791 * `mbedtls_ssl_conf_ca_cb()` for more information.
792 *
Valerio Setti8e45cdd2023-01-05 09:32:29 +0100793 * Requires: MBEDTLS_X509_CRT_PARSE_C
794 *
Hanno Becker288dedc2019-03-27 11:00:53 +0000795 * Uncomment to enable trusted certificate callbacks.
796 */
797//#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
798
799/**
Hanno Becker612a2f12020-10-09 09:19:39 +0100800 * \def MBEDTLS_X509_REMOVE_INFO
Peter Kolbus9a969b62018-12-11 13:55:56 -0600801 *
Chris Jones2c745862020-12-16 11:41:06 +0000802 * Disable mbedtls_x509_*_info() and related APIs.
Peter Kolbus9a969b62018-12-11 13:55:56 -0600803 *
Chris Jones2c745862020-12-16 11:41:06 +0000804 * Uncomment to omit mbedtls_x509_*_info(), as well as mbedtls_debug_print_crt()
Peter Kolbus9a969b62018-12-11 13:55:56 -0600805 * and other functions/constants only used by these functions, thus reducing
806 * the code footprint by several KB.
807 */
Chris Jones2c745862020-12-16 11:41:06 +0000808//#define MBEDTLS_X509_REMOVE_INFO
Peter Kolbus9a969b62018-12-11 13:55:56 -0600809
810/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200811 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +0200812 *
813 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
814 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
815 *
Tomi Fontanillesa70b3c22023-07-16 12:06:13 +0300816 * Requires: MBEDTLS_PKCS1_V21
817 *
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +0200818 * Comment this macro to disallow using RSASSA-PSS in certificates.
819 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200820#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200821/** \} name SECTION: Mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000822
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000823/**
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200824 * \name SECTION: Mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +0000825 *
Gilles Peskinee820c0a2023-08-03 17:45:20 +0200826 * This section enables or disables entire modules in Mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +0000827 * \{
828 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000829
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000830/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200831 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000832 *
833 * Enable the debug functions.
834 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000835 * Module: library/debug.c
Ronald Cronde1adee2022-03-07 16:20:30 +0100836 * Caller: library/ssl_msg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000837 * library/ssl_tls.c
Ronald Cronde1adee2022-03-07 16:20:30 +0100838 * library/ssl_tls12_*.c
839 * library/ssl_tls13_*.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000840 *
841 * This module provides debugging functions.
842 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200843#define MBEDTLS_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000844
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000845/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200846 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +0000847 *
848 * Enable error code to error string conversion.
849 *
850 * Module: library/error.c
851 * Caller:
852 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200853 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +0000854 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200855#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +0000856
857/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200858 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000859 *
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100860 * Enable the TCP and UDP over IPv6/IPv4 networking routines.
861 *
Simon Butcherd567a232016-03-09 20:19:21 +0000862 * \note This module only works on POSIX/Unix (including Linux, BSD and OS X)
863 * and Windows. For other platforms, you'll want to disable it, and write your
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100864 * own networking callbacks to be passed to \c mbedtls_ssl_set_bio().
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000865 *
Manuel Pégourié-Gonnard02049dc2016-02-22 16:42:51 +0000866 * \note See also our Knowledge Base article about porting to a new
867 * environment:
Dave Rodgmanb3196842022-10-12 16:47:08 +0100868 * 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 +0000869 *
Andres AG788aa4a2016-09-14 14:32:09 +0100870 * Module: library/net_sockets.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000871 *
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100872 * This module provides networking routines.
Paul Bakker5121ce52009-01-03 21:22:43 +0000873 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200874#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000875
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000876/**
Nayna Jainc9deb182020-11-16 19:03:12 +0000877 * \def MBEDTLS_PKCS7_C
878 *
Dave Rodgman3fe2abf2023-03-10 17:05:54 +0000879 * Enable PKCS #7 core for using PKCS #7-formatted signatures.
Nayna Jainc9deb182020-11-16 19:03:12 +0000880 * RFC Link - https://tools.ietf.org/html/rfc2315
881 *
882 * Module: library/pkcs7.c
883 *
884 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
Nick Child89e82e12022-11-09 10:36:10 -0600885 * MBEDTLS_X509_CRT_PARSE_C MBEDTLS_X509_CRL_PARSE_C,
886 * MBEDTLS_BIGNUM_C, MBEDTLS_MD_C
Nayna Jainc9deb182020-11-16 19:03:12 +0000887 *
Dave Rodgmanefbc5f72023-03-13 12:15:49 +0000888 * This module is required for the PKCS #7 parsing modules.
Nayna Jainc9deb182020-11-16 19:03:12 +0000889 */
Dave Rodgman7c33b0c2023-03-10 15:07:15 +0000890#define MBEDTLS_PKCS7_C
Nayna Jainc9deb182020-11-16 19:03:12 +0000891
892/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200893 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +0000894 *
895 * Enable simple SSL cache implementation.
896 *
897 * Module: library/ssl_cache.c
898 * Caller:
899 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200900 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +0000901 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200902#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +0000903
904/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200905 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +0200906 *
907 * Enable basic implementation of DTLS cookies for hello verification.
908 *
909 * Module: library/ssl_cookie.c
910 * Caller:
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +0200911 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200912#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +0200913
914/**
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +0200915 * \def MBEDTLS_SSL_TICKET_C
916 *
917 * Enable an implementation of TLS server-side callbacks for session tickets.
918 *
919 * Module: library/ssl_ticket.c
920 * Caller:
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +0200921 *
Przemek Stekiel52a428b2022-10-10 08:47:13 +0200922 * Requires: (MBEDTLS_CIPHER_C || MBEDTLS_USE_PSA_CRYPTO) &&
923 * (MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C)
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +0200924 */
925#define MBEDTLS_SSL_TICKET_C
926
927/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200928 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000929 *
930 * Enable the SSL/TLS client code.
931 *
Ronald Cronde1adee2022-03-07 16:20:30 +0100932 * Module: library/ssl*_client.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000933 * Caller:
934 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200935 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000936 *
Janos Follath745e5612024-12-02 13:22:34 +0000937 * \warning You must call psa_crypto_init() before doing any TLS operations.
938 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000939 * This module is required for SSL/TLS client support.
940 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200941#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000942
Paul Bakker9a736322012-11-14 12:39:52 +0000943/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200944 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000945 *
946 * Enable the SSL/TLS server code.
947 *
Ronald Cronde1adee2022-03-07 16:20:30 +0100948 * Module: library/ssl*_server.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000949 * Caller:
950 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200951 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000952 *
Janos Follath745e5612024-12-02 13:22:34 +0000953 * \warning You must call psa_crypto_init() before doing any TLS operations.
954 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000955 * This module is required for SSL/TLS server support.
956 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200957#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000958
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000959/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200960 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000961 *
Paul Bakkere29ab062011-05-18 13:26:54 +0000962 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000963 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000964 * Module: library/ssl_tls.c
Ronald Cronde1adee2022-03-07 16:20:30 +0100965 * Caller: library/ssl*_client.c
966 * library/ssl*_server.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000967 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200968 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
969 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +0000970 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000971 * This module is required for SSL/TLS.
972 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200973#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000974
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000975/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200976 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000977 *
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100978 * Enable the semi-portable timing interface.
979 *
Simon Butcherd567a232016-03-09 20:19:21 +0000980 * \note The provided implementation only works on POSIX/Unix (including Linux,
981 * BSD and OS X) and Windows. On other platforms, you can either disable that
Manuel Pégourié-Gonnard325ce092016-02-22 10:33:34 +0100982 * module and provide your own implementations of the callbacks needed by
983 * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
984 * your own implementation of the whole module by setting
985 * \c MBEDTLS_TIMING_ALT in the current file.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000986 *
Andrzej Kurek57353692022-04-07 08:08:21 -0400987 * \note The timing module will include time.h on suitable platforms
988 * regardless of the setting of MBEDTLS_HAVE_TIME, unless
989 * MBEDTLS_TIMING_ALT is used. See timing.c for more information.
990 *
Manuel Pégourié-Gonnard02049dc2016-02-22 16:42:51 +0000991 * \note See also our Knowledge Base article about porting to a new
992 * environment:
Dave Rodgmanb3196842022-10-12 16:47:08 +0100993 * 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 +0000994 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000995 * Module: library/timing.c
Paul Bakkerecd54fb2013-07-03 14:48:29 +0200996 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200997#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000998
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000999/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001000 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001001 *
1002 * Enable run-time version information.
1003 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001004 * Module: library/version.c
1005 *
1006 * This module provides run-time version information.
1007 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001008#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00001009
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001010/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001011 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001012 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001013 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001014 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001015 * Module: library/x509.c
Simon Butcher2cb47392016-11-04 12:23:11 +00001016 * Caller: library/x509_crl.c
1017 * library/x509_crt.c
1018 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001019 *
Janos Follath277bba82024-11-19 16:14:00 +00001020 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C
Przemek Stekiel278b6672022-08-03 09:50:38 +02001021 *
Janos Follath277bba82024-11-19 16:14:00 +00001022 * \warning You must call psa_crypto_init() before doing any X.509 operation.
Paul Bakker5690efc2011-05-26 13:16:06 +00001023 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001024 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001025 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001026#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001027
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001029 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001030 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001031 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001032 *
Simon Butcher2cb47392016-11-04 12:23:11 +00001033 * Module: library/x509_crt.c
Ronald Cronde1adee2022-03-07 16:20:30 +01001034 * Caller: library/ssl_tls.c
1035 * library/ssl*_client.c
1036 * library/ssl*_server.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001037 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001038 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001039 *
1040 * This module is required for X.509 certificate parsing.
1041 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001042#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001043
1044/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001045 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001046 *
1047 * Enable X.509 CRL parsing.
1048 *
Simon Butcher2cb47392016-11-04 12:23:11 +00001049 * Module: library/x509_crl.c
1050 * Caller: library/x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001051 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001052 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001053 *
1054 * This module is required for X.509 CRL parsing.
1055 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001056#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001057
1058/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001059 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001060 *
1061 * Enable X.509 Certificate Signing Request (CSR) parsing.
1062 *
Simon Butcher2cb47392016-11-04 12:23:11 +00001063 * Module: library/x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001064 * Caller: library/x509_crt_write.c
1065 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001066 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001067 *
1068 * This module is used for reading X.509 certificate request.
1069 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001070#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001071
1072/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001073 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001074 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001075 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001076 *
1077 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001078 *
Przemek Stekiel10836a02022-08-19 08:45:34 +02001079 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_PARSE_C,
Przemek Stekiel278b6672022-08-03 09:50:38 +02001080 *
Janos Follath277bba82024-11-19 16:14:00 +00001081 * \warning You must call psa_crypto_init() before doing any X.509 operation.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001082 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001083 * This module is the basis for creating X.509 certificates and CSRs.
1084 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001085#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001086
1087/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001088 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001089 *
1090 * Enable creating X.509 certificates.
1091 *
1092 * Module: library/x509_crt_write.c
1093 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001094 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001095 *
1096 * This module is required for X.509 certificate creation.
1097 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001098#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001099
1100/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001101 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001102 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001103 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001104 *
1105 * Module: library/x509_csr_write.c
1106 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001107 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001108 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001109 * This module is required for X.509 certificate request writing.
1110 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001111#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001112
Gilles Peskinee820c0a2023-08-03 17:45:20 +02001113/** \} name SECTION: Mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001114
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001115/**
Gilles Peskineba4162a2022-04-11 17:04:38 +02001116 * \name SECTION: General configuration options
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001117 *
Gilles Peskined5793ce2022-04-13 23:05:10 +02001118 * This section contains Mbed TLS build settings that are not associated
1119 * with a particular module.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001120 *
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001121 * \{
1122 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001123
Gilles Peskinea02c1242022-03-16 17:03:19 +01001124/**
1125 * \def MBEDTLS_CONFIG_FILE
1126 *
1127 * If defined, this is a header which will be included instead of
1128 * `"mbedtls/mbedtls_config.h"`.
1129 * This header file specifies the compile-time configuration of Mbed TLS.
Gilles Peskineefffd642022-04-26 18:13:01 +02001130 * Unlike other configuration options, this one must be defined on the
1131 * compiler command line: a definition in `mbedtls_config.h` would have
1132 * no effect.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001133 *
Gilles Peskine6457ef92022-04-11 16:42:37 +02001134 * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
Gilles Peskinea02c1242022-03-16 17:03:19 +01001135 * non-standard feature of the C language, so this feature is only available
Gilles Peskine6457ef92022-04-11 16:42:37 +02001136 * with compilers that perform macro expansion on an <tt>\#include</tt> line.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001137 *
Gilles Peskine58ffcba2022-04-14 12:44:16 +02001138 * The value of this symbol is typically a path in double quotes, either
1139 * absolute or relative to a directory on the include search path.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001140 */
1141//#define MBEDTLS_CONFIG_FILE "mbedtls/mbedtls_config.h"
1142
1143/**
1144 * \def MBEDTLS_USER_CONFIG_FILE
1145 *
1146 * If defined, this is a header which will be included after
1147 * `"mbedtls/mbedtls_config.h"` or #MBEDTLS_CONFIG_FILE.
Gilles Peskinef68f43a2022-04-13 23:22:20 +02001148 * This allows you to modify the default configuration, including the ability
1149 * to undefine options that are enabled by default.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001150 *
Gilles Peskine6457ef92022-04-11 16:42:37 +02001151 * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
Gilles Peskinea02c1242022-03-16 17:03:19 +01001152 * non-standard feature of the C language, so this feature is only available
Gilles Peskine6457ef92022-04-11 16:42:37 +02001153 * with compilers that perform macro expansion on an <tt>\#include</tt> line.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001154 *
Gilles Peskine58ffcba2022-04-14 12:44:16 +02001155 * The value of this symbol is typically a path in double quotes, either
1156 * absolute or relative to a directory on the include search path.
Gilles Peskinea02c1242022-03-16 17:03:19 +01001157 */
1158//#define MBEDTLS_USER_CONFIG_FILE "/dev/null"
1159
Gilles Peskineba4162a2022-04-11 17:04:38 +02001160/** \} name SECTION: General configuration options */
1161
1162/**
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001163 * \name SECTION: Module configuration options
1164 *
1165 * This section allows for the setting of module specific sizes and
1166 * configuration options. The default values are already present in the
1167 * relevant header files and should suffice for the regular use cases.
1168 *
1169 * Our advice is to enable options and change their values here
1170 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001171 * \{
1172 */
Gilles Peskine3f49cc12022-04-13 23:21:16 +02001173/* The Doxygen documentation here is used when a user comments out a
1174 * setting and runs doxygen themselves. On the other hand, when we typeset
1175 * the full documentation including disabled settings, the documentation
1176 * in specific modules' header files is used if present. When editing this
1177 * file, make sure that each option is documented in exactly one place,
1178 * plus optionally a same-line Doxygen comment here if there is a Doxygen
1179 * comment in the specific module. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001180
Paul Bakker088c5c52014-04-25 11:11:10 +02001181/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001182//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1183//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker6e339b52013-07-03 13:37:05 +02001184
Paul Bakker088c5c52014-04-25 11:11:10 +02001185/* SSL options */
Angus Grattond8213d02016-05-25 20:56:48 +10001186
Angus Grattond8213d02016-05-25 20:56:48 +10001187/** \def MBEDTLS_SSL_IN_CONTENT_LEN
1188 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001189 * Maximum length (in bytes) of incoming plaintext fragments.
Angus Grattond8213d02016-05-25 20:56:48 +10001190 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001191 * This determines the size of the incoming TLS I/O buffer in such a way
1192 * that it is capable of holding the specified amount of plaintext data,
1193 * regardless of the protection mechanism used.
1194 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001195 * \note When using a value less than the default of 16KB on the client, it is
1196 * recommended to use the Maximum Fragment Length (MFL) extension to
1197 * inform the server about this limitation. On the server, there
1198 * is no supported, standardized way of informing the client about
1199 * restriction on the maximum size of incoming messages, and unless
1200 * the limitation has been communicated by other means, it is recommended
1201 * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
1202 * while keeping the default value of 16KB for the incoming buffer.
1203 *
David Horstmann95d516f2021-05-04 18:36:56 +01001204 * Uncomment to set the maximum plaintext size of the incoming I/O buffer.
Angus Grattond8213d02016-05-25 20:56:48 +10001205 */
1206//#define MBEDTLS_SSL_IN_CONTENT_LEN 16384
1207
Gilles Peskined3d02902020-03-04 21:35:27 +01001208/** \def MBEDTLS_SSL_CID_IN_LEN_MAX
1209 *
1210 * The maximum length of CIDs used for incoming DTLS messages.
1211 *
1212 */
1213//#define MBEDTLS_SSL_CID_IN_LEN_MAX 32
1214
1215/** \def MBEDTLS_SSL_CID_OUT_LEN_MAX
1216 *
1217 * The maximum length of CIDs used for outgoing DTLS messages.
1218 *
1219 */
1220//#define MBEDTLS_SSL_CID_OUT_LEN_MAX 32
1221
TRodziewicze8dd7092021-05-12 14:19:11 +02001222/** \def MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY
Gilles Peskined3d02902020-03-04 21:35:27 +01001223 *
1224 * This option controls the use of record plaintext padding
TRodziewicz1e660ed2021-05-26 17:08:54 +02001225 * in TLS 1.3 and when using the Connection ID extension in DTLS 1.2.
Hanno Becker13996922020-05-28 16:15:19 +01001226 *
1227 * The padding will always be chosen so that the length of the
1228 * padded plaintext is a multiple of the value of this option.
1229 *
1230 * Note: A value of \c 1 means that no padding will be used
1231 * for outgoing records.
1232 *
1233 * Note: On systems lacking division instructions,
1234 * a power of two should be preferred.
1235 */
TRodziewicze8dd7092021-05-12 14:19:11 +02001236//#define MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 16
Hanno Becker13996922020-05-28 16:15:19 +01001237
Angus Grattond8213d02016-05-25 20:56:48 +10001238/** \def MBEDTLS_SSL_OUT_CONTENT_LEN
1239 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001240 * Maximum length (in bytes) of outgoing plaintext fragments.
Angus Grattond8213d02016-05-25 20:56:48 +10001241 *
Andrzej Kurekc470b6b2019-01-31 08:20:20 -05001242 * This determines the size of the outgoing TLS I/O buffer in such a way
1243 * that it is capable of holding the specified amount of plaintext data,
1244 * regardless of the protection mechanism used.
1245 *
Angus Grattond8213d02016-05-25 20:56:48 +10001246 * It is possible to save RAM by setting a smaller outward buffer, while keeping
1247 * the default inward 16384 byte buffer to conform to the TLS specification.
1248 *
1249 * The minimum required outward buffer size is determined by the handshake
1250 * protocol's usage. Handshaking will fail if the outward buffer is too small.
1251 * The specific size requirement depends on the configured ciphers and any
1252 * certificate data which is sent during the handshake.
1253 *
David Horstmann95d516f2021-05-04 18:36:56 +01001254 * Uncomment to set the maximum plaintext size of the outgoing I/O buffer.
Angus Grattond8213d02016-05-25 20:56:48 +10001255 */
1256//#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384
1257
Hanno Beckere0b150f2018-08-21 15:51:03 +01001258/** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING
1259 *
1260 * Maximum number of heap-allocated bytes for the purpose of
1261 * DTLS handshake message reassembly and future message buffering.
1262 *
Yuto Takano7828ca22021-08-10 11:26:15 +01001263 * This should be at least 9/8 * MBEDTLS_SSL_IN_CONTENT_LEN
Hanno Becker28007512018-08-28 09:46:44 +01001264 * to account for a reassembled handshake message of maximum size,
1265 * together with its reassembly bitmap.
1266 *
Hanno Becker97a1c132018-08-28 14:42:15 +01001267 * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default)
Hanno Becker28007512018-08-28 09:46:44 +01001268 * should be sufficient for all practical situations as it allows
1269 * to reassembly a large handshake message (such as a certificate)
1270 * while buffering multiple smaller handshake messages.
1271 *
Hanno Beckere0b150f2018-08-21 15:51:03 +01001272 */
Hanno Becker159a37f2018-08-24 15:07:29 +01001273//#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
Hanno Beckere0b150f2018-08-21 15:51:03 +01001274
Ronald Cron1aa6e8d2023-02-23 09:46:54 +01001275//#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 +02001276//#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 +02001277
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02001278/**
1279 * Complete list of ciphersuites to use, in order of preference.
1280 *
1281 * \warning No dependency checking is done on that field! This option can only
1282 * be used to restrict the set of available ciphersuites. It is your
1283 * responsibility to make sure the needed modules are active.
1284 *
1285 * Use this to save a few hundred bytes of ROM (default ordering of all
1286 * available ciphersuites) and a few to a few hundred bytes of RAM.
1287 *
1288 * The value below is only an example, not the default.
1289 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001290//#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 +02001291
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001292/**
Tom Cosgrovea63775b2023-09-14 13:31:19 +01001293 * \def MBEDTLS_SSL_MAX_EARLY_DATA_SIZE
1294 *
1295 * The default maximum amount of 0-RTT data. See the documentation of
Yanray Wang07517612023-11-07 11:47:36 +08001296 * \c mbedtls_ssl_conf_max_early_data_size() for more information.
Tom Cosgrovea63775b2023-09-14 13:31:19 +01001297 *
1298 * It must be positive and smaller than UINT32_MAX.
1299 *
1300 * If MBEDTLS_SSL_EARLY_DATA is not defined, this default value does not
1301 * have any impact on the build.
Tom Cosgrovea63775b2023-09-14 13:31:19 +01001302 */
1303//#define MBEDTLS_SSL_MAX_EARLY_DATA_SIZE 1024
1304
1305/**
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001306 * \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
1307 *
Jerry Yucf913512023-11-14 11:06:52 +08001308 * Maximum allowed ticket age difference in milliseconds tolerated between
Jerry Yu034a8b72023-11-10 12:20:19 +08001309 * server and client. Default value is 6000. This is not used in TLS 1.2.
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001310 *
Jerry Yu034a8b72023-11-10 12:20:19 +08001311 * - The client ticket age is the time difference between the time when the
1312 * client proposes to the server to use the ticket and the time the client
1313 * received the ticket from the server.
1314 * - The server ticket age is the time difference between the time when the
1315 * server receives a proposition from the client to use the ticket and the
1316 * time when the ticket was created by the server.
1317 *
Jerry Yucf913512023-11-14 11:06:52 +08001318 * The ages might be different due to the client and server clocks not running
1319 * at the same pace. The typical accuracy of an RTC crystal is ±100 to ±20 parts
1320 * per million (360 to 72 milliseconds per hour). Default tolerance window is
1321 * 6s, thus in the worst case clients and servers must sync up their system time
1322 * every 6000/360/2~=8 hours.
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001323 *
Jerry Yu04fceb72023-11-15 09:52:46 +08001324 * See section 8.3 of the TLS 1.3 specification(RFC 8446) for more information.
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001325 */
Gilles Peskined65ea422023-09-05 21:07:32 +02001326//#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001327
1328/**
1329 * \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH
1330 *
1331 * Size in bytes of a ticket nonce. This is not used in TLS 1.2.
1332 *
1333 * This must be less than 256.
1334 */
Gilles Peskined65ea422023-09-05 21:07:32 +02001335//#define MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH 32
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001336
1337/**
1338 * \def MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS
1339 *
1340 * Default number of NewSessionTicket messages to be sent by a TLS 1.3 server
1341 * after handshake completion. This is not used in TLS 1.2 and relevant only if
1342 * the MBEDTLS_SSL_SESSION_TICKETS option is enabled.
1343 *
1344 */
Gilles Peskined65ea422023-09-05 21:07:32 +02001345//#define MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS 1
Gilles Peskinea8d7e432022-08-04 23:39:41 +02001346
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01001347/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001348//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
Andres AGf9113192016-09-02 14:06:04 +01001349//#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 +01001350
Gilles Peskine611179c2022-04-13 23:04:48 +02001351/** \} name SECTION: Module configuration options */