Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /** |
Bence Szépkúti | bb0cfeb | 2021-05-28 09:42:25 +0200 | [diff] [blame] | 2 | * \file mbedtls_config.h |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 3 | * |
Paul Bakker | 37ca75d | 2011-01-06 12:28:03 +0000 | [diff] [blame] | 4 | * \brief Configuration options (set of defines) |
| 5 | * |
Simon Butcher | 5b331b9 | 2016-01-03 16:14:14 +0000 | [diff] [blame] | 6 | * This set of compile-time options may be used to enable |
| 7 | * or disable features selectively, and reduce the global |
| 8 | * memory footprint. |
Darryl Green | a40a101 | 2018-01-05 15:33:17 +0000 | [diff] [blame] | 9 | */ |
| 10 | /* |
Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 11 | * Copyright The Mbed TLS Contributors |
Dave Rodgman | 16799db | 2023-11-02 19:47:20 +0000 | [diff] [blame] | 12 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
Manuel Pégourié-Gonnard | e2b0efe | 2015-08-11 10:38:37 +0200 | [diff] [blame] | 13 | */ |
| 14 | |
Bence Szépkúti | 2bb7456 | 2021-06-21 16:19:00 +0200 | [diff] [blame] | 15 | /** |
Tom Cosgrove | 1e21144 | 2022-05-26 11:51:00 +0100 | [diff] [blame] | 16 | * This is an optional version symbol that enables compatibility handling of |
Bence Szépkúti | 2bb7456 | 2021-06-21 16:19:00 +0200 | [diff] [blame] | 17 | * config files. |
| 18 | * |
Bence Szépkúti | 1b2a883 | 2021-06-28 10:26:11 +0100 | [diff] [blame] | 19 | * It is equal to the #MBEDTLS_VERSION_NUMBER of the Mbed TLS version that |
Bence Szépkúti | 2bb7456 | 2021-06-21 16:19:00 +0200 | [diff] [blame] | 20 | * introduced the config format we want to be compatible with. |
| 21 | */ |
Bence Szépkúti | 1cafe5c | 2021-06-22 09:30:08 +0200 | [diff] [blame] | 22 | //#define MBEDTLS_CONFIG_VERSION 0x03000000 |
Bence Szépkúti | ba7248a | 2021-05-31 16:53:56 +0200 | [diff] [blame] | 23 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 24 | /** |
Minos Galanakis | acd560f | 2024-12-12 15:30:05 +0000 | [diff] [blame] | 25 | * \name SECTION: Platform abstraction layer |
| 26 | * |
| 27 | * This section sets platform specific settings. |
| 28 | * \{ |
| 29 | */ |
| 30 | |
Minos Galanakis | acd560f | 2024-12-12 15:30:05 +0000 | [diff] [blame] | 31 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 32 | * \def MBEDTLS_NET_C |
Minos Galanakis | acd560f | 2024-12-12 15:30:05 +0000 | [diff] [blame] | 33 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 34 | * Enable the TCP and UDP over IPv6/IPv4 networking routines. |
Minos Galanakis | acd560f | 2024-12-12 15:30:05 +0000 | [diff] [blame] | 35 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 36 | * \note This module only works on POSIX/Unix (including Linux, BSD and OS X) |
| 37 | * and Windows. For other platforms, you'll want to disable it, and write your |
| 38 | * own networking callbacks to be passed to \c mbedtls_ssl_set_bio(). |
Minos Galanakis | acd560f | 2024-12-12 15:30:05 +0000 | [diff] [blame] | 39 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 40 | * \note See also our Knowledge Base article about porting to a new |
| 41 | * environment: |
| 42 | * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 43 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 44 | * Module: library/net_sockets.c |
| 45 | * |
| 46 | * This module provides networking routines. |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 47 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 48 | #define MBEDTLS_NET_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 49 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 50 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 51 | * \def MBEDTLS_TIMING_ALT |
Paul Bakker | f2561b3 | 2014-02-06 15:11:55 +0100 | [diff] [blame] | 52 | * |
TRodziewicz | d854083 | 2021-06-10 15:16:50 +0200 | [diff] [blame] | 53 | * Uncomment to provide your own alternate implementation for |
Manuel Pégourié-Gonnard | a63bc94 | 2015-05-14 18:22:47 +0200 | [diff] [blame] | 54 | * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay() |
Paul Bakker | f2561b3 | 2014-02-06 15:11:55 +0100 | [diff] [blame] | 55 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 56 | * Only works if you have MBEDTLS_TIMING_C enabled. |
Paul Bakker | f2561b3 | 2014-02-06 15:11:55 +0100 | [diff] [blame] | 57 | * |
| 58 | * You will need to provide a header "timing_alt.h" and an implementation at |
| 59 | * compile time. |
| 60 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 61 | //#define MBEDTLS_TIMING_ALT |
Paul Bakker | f2561b3 | 2014-02-06 15:11:55 +0100 | [diff] [blame] | 62 | |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 63 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 64 | * \def MBEDTLS_TIMING_C |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 65 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 66 | * Enable the semi-portable timing interface. |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 67 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 68 | * \note The provided implementation only works on POSIX/Unix (including Linux, |
| 69 | * BSD and OS X) and Windows. On other platforms, you can either disable that |
| 70 | * module and provide your own implementations of the callbacks needed by |
| 71 | * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide |
| 72 | * your own implementation of the whole module by setting |
| 73 | * \c MBEDTLS_TIMING_ALT in the current file. |
| 74 | * |
| 75 | * \note The timing module will include time.h on suitable platforms |
| 76 | * regardless of the setting of MBEDTLS_HAVE_TIME, unless |
| 77 | * MBEDTLS_TIMING_ALT is used. See timing.c for more information. |
| 78 | * |
| 79 | * \note See also our Knowledge Base article about porting to a new |
| 80 | * environment: |
| 81 | * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS |
| 82 | * |
| 83 | * Module: library/timing.c |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 84 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 85 | #define MBEDTLS_TIMING_C |
| 86 | |
| 87 | /** \} name SECTION: Platform abstraction layer */ |
| 88 | |
| 89 | /** |
| 90 | * \name SECTION: General configuration options |
| 91 | * |
Minos Galanakis | 1bf85a8 | 2024-12-12 16:29:38 +0000 | [diff] [blame] | 92 | * This section contains Mbed TLS build settings that are not associated |
| 93 | * with a particular module. |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 94 | * \{ |
| 95 | */ |
| 96 | |
| 97 | /** |
| 98 | * \def MBEDTLS_ERROR_C |
| 99 | * |
| 100 | * Enable error code to error string conversion. |
| 101 | * |
| 102 | * Module: library/error.c |
| 103 | * Caller: |
| 104 | * |
| 105 | * This module enables mbedtls_strerror(). |
| 106 | */ |
| 107 | #define MBEDTLS_ERROR_C |
| 108 | |
| 109 | /** |
| 110 | * \def MBEDTLS_ERROR_STRERROR_DUMMY |
| 111 | * |
| 112 | * Enable a dummy error function to make use of mbedtls_strerror() in |
| 113 | * third party libraries easier when MBEDTLS_ERROR_C is disabled |
| 114 | * (no effect when MBEDTLS_ERROR_C is enabled). |
| 115 | * |
| 116 | * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're |
| 117 | * not using mbedtls_strerror() or error_strerror() in your application. |
| 118 | * |
| 119 | * Disable if you run into name conflicts and want to really remove the |
| 120 | * mbedtls_strerror() |
| 121 | */ |
| 122 | #define MBEDTLS_ERROR_STRERROR_DUMMY |
| 123 | |
| 124 | /** |
| 125 | * \def MBEDTLS_VERSION_C |
| 126 | * |
| 127 | * Enable run-time version information. |
| 128 | * |
| 129 | * Module: library/version.c |
| 130 | * |
| 131 | * This module provides run-time version information. |
| 132 | */ |
| 133 | #define MBEDTLS_VERSION_C |
| 134 | |
| 135 | /** |
| 136 | * \def MBEDTLS_VERSION_FEATURES |
| 137 | * |
| 138 | * Allow run-time checking of compile-time enabled features. Thus allowing users |
| 139 | * to check at run-time if the library is for instance compiled with threading |
| 140 | * support via mbedtls_version_check_feature(). |
| 141 | * |
| 142 | * Requires: MBEDTLS_VERSION_C |
| 143 | * |
| 144 | * Comment this to disable run-time checking and save ROM space |
| 145 | */ |
| 146 | #define MBEDTLS_VERSION_FEATURES |
| 147 | |
| 148 | /** |
| 149 | * \def MBEDTLS_CONFIG_FILE |
| 150 | * |
| 151 | * If defined, this is a header which will be included instead of |
| 152 | * `"mbedtls/mbedtls_config.h"`. |
| 153 | * This header file specifies the compile-time configuration of Mbed TLS. |
| 154 | * Unlike other configuration options, this one must be defined on the |
| 155 | * compiler command line: a definition in `mbedtls_config.h` would have |
| 156 | * no effect. |
| 157 | * |
| 158 | * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but |
| 159 | * non-standard feature of the C language, so this feature is only available |
| 160 | * with compilers that perform macro expansion on an <tt>\#include</tt> line. |
| 161 | * |
| 162 | * The value of this symbol is typically a path in double quotes, either |
| 163 | * absolute or relative to a directory on the include search path. |
| 164 | */ |
| 165 | //#define MBEDTLS_CONFIG_FILE "mbedtls/mbedtls_config.h" |
| 166 | |
| 167 | /** |
| 168 | * \def MBEDTLS_USER_CONFIG_FILE |
| 169 | * |
| 170 | * If defined, this is a header which will be included after |
| 171 | * `"mbedtls/mbedtls_config.h"` or #MBEDTLS_CONFIG_FILE. |
| 172 | * This allows you to modify the default configuration, including the ability |
| 173 | * to undefine options that are enabled by default. |
| 174 | * |
| 175 | * This macro is expanded after an <tt>\#include</tt> directive. This is a popular but |
| 176 | * non-standard feature of the C language, so this feature is only available |
| 177 | * with compilers that perform macro expansion on an <tt>\#include</tt> line. |
| 178 | * |
| 179 | * The value of this symbol is typically a path in double quotes, either |
| 180 | * absolute or relative to a directory on the include search path. |
| 181 | */ |
| 182 | //#define MBEDTLS_USER_CONFIG_FILE "/dev/null" |
| 183 | |
| 184 | /** \} name SECTION: General configuration options */ |
| 185 | |
| 186 | /** |
| 187 | * \name SECTION: TLS feature selection |
| 188 | * |
Minos Galanakis | 1bf85a8 | 2024-12-12 16:29:38 +0000 | [diff] [blame] | 189 | * This section sets support for features that are or are not needed |
| 190 | * within the modules that are enabled. |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 191 | * \{ |
| 192 | */ |
| 193 | |
| 194 | /** |
| 195 | * \def MBEDTLS_DEBUG_C |
| 196 | * |
| 197 | * Enable the debug functions. |
| 198 | * |
| 199 | * Module: library/debug.c |
| 200 | * Caller: library/ssl_msg.c |
| 201 | * library/ssl_tls.c |
| 202 | * library/ssl_tls12_*.c |
| 203 | * library/ssl_tls13_*.c |
| 204 | * |
| 205 | * This module provides debugging functions. |
| 206 | */ |
| 207 | #define MBEDTLS_DEBUG_C |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 208 | |
| 209 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 210 | * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 211 | * |
| 212 | * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. |
| 213 | * |
| 214 | * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH |
| 215 | * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA |
| 216 | * MBEDTLS_X509_CRT_PARSE_C |
| 217 | * |
| 218 | * This enables the following ciphersuites (if other requisites are |
| 219 | * enabled as well): |
| 220 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 |
| 221 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 |
| 222 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA |
| 223 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 224 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 225 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 226 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 |
| 227 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA |
| 228 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 229 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 230 | */ |
| 231 | #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 232 | |
| 233 | /** |
| 234 | * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED |
| 235 | * |
| 236 | * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. |
| 237 | * |
| 238 | * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH |
| 239 | * |
| 240 | * This enables the following ciphersuites (if other requisites are |
| 241 | * enabled as well): |
| 242 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 |
| 243 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA |
| 244 | * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 245 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 |
| 246 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA |
| 247 | * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 248 | */ |
| 249 | #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED |
| 250 | |
| 251 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 252 | * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 253 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 254 | * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 255 | * |
Janos Follath | 277bba8 | 2024-11-19 16:14:00 +0000 | [diff] [blame] | 256 | * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH |
Manuel Pégourié-Gonnard | 4fa702a | 2023-03-29 12:15:24 +0200 | [diff] [blame] | 257 | * MBEDTLS_RSA_C |
| 258 | * MBEDTLS_PKCS1_V15 |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 259 | * MBEDTLS_X509_CRT_PARSE_C |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 260 | * |
| 261 | * This enables the following ciphersuites (if other requisites are |
| 262 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 263 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
| 264 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |
| 265 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
| 266 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 267 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 268 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
| 269 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |
| 270 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 271 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 272 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 273 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 274 | #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 275 | |
| 276 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 277 | * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 278 | * |
| 279 | * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. |
| 280 | * |
Janos Follath | 277bba8 | 2024-11-19 16:14:00 +0000 | [diff] [blame] | 281 | * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH |
| 282 | * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA |
Manuel Pégourié-Gonnard | 4fa702a | 2023-03-29 12:15:24 +0200 | [diff] [blame] | 283 | * MBEDTLS_X509_CRT_PARSE_C |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 284 | * |
| 285 | * This enables the following ciphersuites (if other requisites are |
| 286 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 287 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA |
| 288 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA |
| 289 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 |
| 290 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 |
| 291 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 |
| 292 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 |
| 293 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 294 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 295 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 296 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 297 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 298 | #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 299 | |
| 300 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 301 | * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 302 | * |
| 303 | * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS. |
| 304 | * |
Janos Follath | 277bba8 | 2024-11-19 16:14:00 +0000 | [diff] [blame] | 305 | * Requires: MBEDTLS_ECDH_C or PSA_WANT_ALG_ECDH |
Manuel Pégourié-Gonnard | 4fa702a | 2023-03-29 12:15:24 +0200 | [diff] [blame] | 306 | * MBEDTLS_RSA_C |
| 307 | * MBEDTLS_X509_CRT_PARSE_C |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 308 | * |
| 309 | * This enables the following ciphersuites (if other requisites are |
| 310 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 311 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA |
| 312 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA |
| 313 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 |
| 314 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 |
| 315 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 |
| 316 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 |
| 317 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 318 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 319 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 320 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 321 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 322 | #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 323 | |
| 324 | /** |
Manuel Pégourié-Gonnard | 557535d | 2015-09-15 17:53:32 +0200 | [diff] [blame] | 325 | * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED |
| 326 | * |
| 327 | * Enable the ECJPAKE based ciphersuite modes in SSL / TLS. |
| 328 | * |
Manuel Pégourié-Gonnard | 75df902 | 2015-09-16 23:21:01 +0200 | [diff] [blame] | 329 | * \warning This is currently experimental. EC J-PAKE support is based on the |
| 330 | * Thread v1.0.0 specification; incompatible changes to the specification |
| 331 | * might still happen. For this reason, this is disabled by default. |
Manuel Pégourié-Gonnard | 557535d | 2015-09-15 17:53:32 +0200 | [diff] [blame] | 332 | * |
Janos Follath | 277bba8 | 2024-11-19 16:14:00 +0000 | [diff] [blame] | 333 | * Requires: MBEDTLS_ECJPAKE_C or PSA_WANT_ALG_JPAKE |
Manuel Pégourié-Gonnard | 41bc8b6 | 2023-03-14 23:59:24 +0100 | [diff] [blame] | 334 | * SHA-256 (via MBEDTLS_SHA256_C or a PSA driver) |
Manuel Pégourié-Gonnard | 557535d | 2015-09-15 17:53:32 +0200 | [diff] [blame] | 335 | * MBEDTLS_ECP_DP_SECP256R1_ENABLED |
| 336 | * |
| 337 | * This enables the following ciphersuites (if other requisites are |
| 338 | * enabled as well): |
| 339 | * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 |
| 340 | */ |
Manuel Pégourié-Gonnard | cf82893 | 2015-10-20 14:57:00 +0200 | [diff] [blame] | 341 | //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED |
Manuel Pégourié-Gonnard | 557535d | 2015-09-15 17:53:32 +0200 | [diff] [blame] | 342 | |
| 343 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 344 | * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 345 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 346 | * Enable the PSK based ciphersuite modes in SSL / TLS. |
Manuel Pégourié-Gonnard | dc16aa7 | 2014-06-25 12:55:12 +0200 | [diff] [blame] | 347 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 348 | * This enables the following ciphersuites (if other requisites are |
| 349 | * enabled as well): |
| 350 | * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 |
| 351 | * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 |
| 352 | * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA |
| 353 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 354 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 355 | * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 |
| 356 | * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 |
| 357 | * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA |
| 358 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 359 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 360 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 361 | #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED |
| 362 | |
| 363 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 364 | * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 365 | * |
| 366 | * Enable sending of alert messages in case of encountered errors as per RFC. |
Gilles Peskine | e820c0a | 2023-08-03 17:45:20 +0200 | [diff] [blame] | 367 | * If you choose not to send the alert messages, Mbed TLS can still communicate |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 368 | * with other servers, only debugging of failures is harder. |
| 369 | * |
| 370 | * The advantage of not sending alert messages, is that no information is given |
| 371 | * about reasons for failures thus preventing adversaries of gaining intel. |
| 372 | * |
| 373 | * Enable sending of all alert messages |
| 374 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 375 | #define MBEDTLS_SSL_ALL_ALERT_MESSAGES |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 376 | |
| 377 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 378 | * \def MBEDTLS_SSL_ALPN |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 379 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 380 | * Enable support for RFC 7301 Application Layer Protocol Negotiation. |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 381 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 382 | * Comment this macro to disable support for ALPN. |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 383 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 384 | #define MBEDTLS_SSL_ALPN |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 385 | |
| 386 | /** |
Gilles Peskine | b74a1c7 | 2018-04-24 13:09:22 +0200 | [diff] [blame] | 387 | * \def MBEDTLS_SSL_ASYNC_PRIVATE |
| 388 | * |
| 389 | * Enable asynchronous external private key operations in SSL. This allows |
| 390 | * you to configure an SSL connection to call an external cryptographic |
| 391 | * module to perform private key operations instead of performing the |
| 392 | * operation inside the library. |
| 393 | * |
Valerio Setti | 8841d6b | 2023-01-05 08:40:24 +0100 | [diff] [blame] | 394 | * Requires: MBEDTLS_X509_CRT_PARSE_C |
Gilles Peskine | b74a1c7 | 2018-04-24 13:09:22 +0200 | [diff] [blame] | 395 | */ |
Jaeden Amero | d9c71da | 2018-06-15 20:31:26 +0100 | [diff] [blame] | 396 | //#define MBEDTLS_SSL_ASYNC_PRIVATE |
Gilles Peskine | b74a1c7 | 2018-04-24 13:09:22 +0200 | [diff] [blame] | 397 | |
| 398 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 399 | * \def MBEDTLS_SSL_CACHE_C |
| 400 | * |
| 401 | * Enable simple SSL cache implementation. |
| 402 | * |
| 403 | * Module: library/ssl_cache.c |
| 404 | * Caller: |
| 405 | * |
| 406 | * Requires: MBEDTLS_SSL_CACHE_C |
| 407 | */ |
| 408 | #define MBEDTLS_SSL_CACHE_C |
| 409 | |
| 410 | /** |
| 411 | * \def MBEDTLS_SSL_CLI_C |
| 412 | * |
| 413 | * Enable the SSL/TLS client code. |
| 414 | * |
| 415 | * Module: library/ssl*_client.c |
| 416 | * Caller: |
| 417 | * |
| 418 | * Requires: MBEDTLS_SSL_TLS_C |
| 419 | * |
| 420 | * \warning You must call psa_crypto_init() before doing any TLS operations. |
| 421 | * |
| 422 | * This module is required for SSL/TLS client support. |
| 423 | */ |
| 424 | #define MBEDTLS_SSL_CLI_C |
| 425 | |
| 426 | /** |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 427 | * \def MBEDTLS_SSL_CONTEXT_SERIALIZATION |
| 428 | * |
| 429 | * Enable serialization of the TLS context structures, through use of the |
| 430 | * functions mbedtls_ssl_context_save() and mbedtls_ssl_context_load(). |
| 431 | * |
| 432 | * This pair of functions allows one side of a connection to serialize the |
| 433 | * context associated with the connection, then free or re-use that context |
| 434 | * while the serialized state is persisted elsewhere, and finally deserialize |
| 435 | * that state to a live context for resuming read/write operations on the |
| 436 | * connection. From a protocol perspective, the state of the connection is |
| 437 | * unaffected, in particular this is entirely transparent to the peer. |
| 438 | * |
| 439 | * Note: this is distinct from TLS session resumption, which is part of the |
| 440 | * protocol and fully visible by the peer. TLS session resumption enables |
| 441 | * establishing new connections associated to a saved session with shorter, |
| 442 | * lighter handshakes, while context serialization is a local optimization in |
| 443 | * handling a single, potentially long-lived connection. |
| 444 | * |
| 445 | * Enabling these APIs makes some SSL structures larger, as 64 extra bytes are |
| 446 | * saved after the handshake to allow for more efficient serialization, so if |
| 447 | * you don't need this feature you'll save RAM by disabling it. |
| 448 | * |
Przemek Stekiel | 460192e | 2022-10-03 08:55:29 +0200 | [diff] [blame] | 449 | * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C |
| 450 | * |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 451 | * Comment to disable the context serialization APIs. |
| 452 | */ |
| 453 | #define MBEDTLS_SSL_CONTEXT_SERIALIZATION |
| 454 | |
| 455 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 456 | * \def MBEDTLS_SSL_COOKIE_C |
| 457 | * |
| 458 | * Enable basic implementation of DTLS cookies for hello verification. |
| 459 | * |
| 460 | * Module: library/ssl_cookie.c |
| 461 | * Caller: |
| 462 | */ |
| 463 | #define MBEDTLS_SSL_COOKIE_C |
| 464 | |
| 465 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 466 | * \def MBEDTLS_SSL_DEBUG_ALL |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 467 | * |
| 468 | * Enable the debug messages in SSL module for all issues. |
| 469 | * Debug messages have been disabled in some places to prevent timing |
| 470 | * attacks due to (unbalanced) debugging function calls. |
| 471 | * |
| 472 | * If you need all error reporting you should enable this during debugging, |
| 473 | * but remove this for production servers that should log as well. |
| 474 | * |
| 475 | * Uncomment this macro to report all debug messages on errors introducing |
| 476 | * a timing side-channel. |
| 477 | * |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 478 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 479 | //#define MBEDTLS_SSL_DEBUG_ALL |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 480 | |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 481 | /** |
| 482 | * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY |
| 483 | * |
| 484 | * Enable support for the anti-replay mechanism in DTLS. |
| 485 | * |
| 486 | * Requires: MBEDTLS_SSL_TLS_C |
| 487 | * MBEDTLS_SSL_PROTO_DTLS |
| 488 | * |
| 489 | * \warning Disabling this is often a security risk! |
| 490 | * See mbedtls_ssl_conf_dtls_anti_replay() for details. |
| 491 | * |
| 492 | * Comment this to disable anti-replay in DTLS. |
| 493 | */ |
| 494 | #define MBEDTLS_SSL_DTLS_ANTI_REPLAY |
| 495 | |
| 496 | /** |
| 497 | * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE |
| 498 | * |
| 499 | * Enable server-side support for clients that reconnect from the same port. |
| 500 | * |
| 501 | * Some clients unexpectedly close the connection and try to reconnect using the |
| 502 | * same source port. This needs special support from the server to handle the |
| 503 | * new connection securely, as described in section 4.2.8 of RFC 6347. This |
| 504 | * flag enables that support. |
| 505 | * |
| 506 | * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY |
| 507 | * |
| 508 | * Comment this to disable support for clients reusing the source port. |
| 509 | */ |
| 510 | #define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE |
| 511 | |
| 512 | /** |
| 513 | * \def MBEDTLS_SSL_DTLS_CONNECTION_ID |
| 514 | * |
| 515 | * Enable support for the DTLS Connection ID (CID) extension, |
| 516 | * which allows to identify DTLS connections across changes |
| 517 | * in the underlying transport. The CID functionality is described |
| 518 | * in RFC 9146. |
| 519 | * |
| 520 | * Setting this option enables the SSL APIs `mbedtls_ssl_set_cid()`, |
| 521 | * mbedtls_ssl_get_own_cid()`, `mbedtls_ssl_get_peer_cid()` and |
| 522 | * `mbedtls_ssl_conf_cid()`. See the corresponding documentation for |
| 523 | * more information. |
| 524 | * |
| 525 | * The maximum lengths of outgoing and incoming CIDs can be configured |
| 526 | * through the options |
| 527 | * - MBEDTLS_SSL_CID_OUT_LEN_MAX |
| 528 | * - MBEDTLS_SSL_CID_IN_LEN_MAX. |
| 529 | * |
| 530 | * Requires: MBEDTLS_SSL_PROTO_DTLS |
| 531 | * |
| 532 | * Uncomment to enable the Connection ID extension. |
| 533 | */ |
| 534 | #define MBEDTLS_SSL_DTLS_CONNECTION_ID |
| 535 | |
| 536 | /** |
| 537 | * \def MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT |
| 538 | * |
| 539 | * Defines whether RFC 9146 (default) or the legacy version |
| 540 | * (version draft-ietf-tls-dtls-connection-id-05, |
| 541 | * https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05) |
| 542 | * is used. |
| 543 | * |
| 544 | * Set the value to 0 for the standard version, and |
| 545 | * 1 for the legacy draft version. |
| 546 | * |
| 547 | * \deprecated Support for the legacy version of the DTLS |
| 548 | * Connection ID feature is deprecated. Please |
| 549 | * switch to the standardized version defined |
| 550 | * in RFC 9146 enabled by utilizing |
| 551 | * MBEDTLS_SSL_DTLS_CONNECTION_ID without use |
| 552 | * of MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT. |
| 553 | * |
| 554 | * Requires: MBEDTLS_SSL_DTLS_CONNECTION_ID |
| 555 | */ |
| 556 | #define MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 0 |
| 557 | |
| 558 | /** |
| 559 | * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY |
| 560 | * |
| 561 | * Enable support for HelloVerifyRequest on DTLS servers. |
| 562 | * |
| 563 | * This feature is highly recommended to prevent DTLS servers being used as |
| 564 | * amplifiers in DoS attacks against other hosts. It should always be enabled |
| 565 | * unless you know for sure amplification cannot be a problem in the |
| 566 | * environment in which your server operates. |
| 567 | * |
| 568 | * \warning Disabling this can be a security risk! (see above) |
| 569 | * |
| 570 | * Requires: MBEDTLS_SSL_PROTO_DTLS |
| 571 | * |
| 572 | * Comment this to disable support for HelloVerifyRequest. |
| 573 | */ |
| 574 | #define MBEDTLS_SSL_DTLS_HELLO_VERIFY |
| 575 | |
| 576 | /** |
| 577 | * \def MBEDTLS_SSL_DTLS_SRTP |
| 578 | * |
| 579 | * Enable support for negotiation of DTLS-SRTP (RFC 5764) |
| 580 | * through the use_srtp extension. |
| 581 | * |
| 582 | * \note This feature provides the minimum functionality required |
| 583 | * to negotiate the use of DTLS-SRTP and to allow the derivation of |
| 584 | * the associated SRTP packet protection key material. |
| 585 | * In particular, the SRTP packet protection itself, as well as the |
| 586 | * demultiplexing of RTP and DTLS packets at the datagram layer |
| 587 | * (see Section 5 of RFC 5764), are not handled by this feature. |
| 588 | * Instead, after successful completion of a handshake negotiating |
| 589 | * the use of DTLS-SRTP, the extended key exporter API |
| 590 | * mbedtls_ssl_conf_export_keys_cb() should be used to implement |
| 591 | * the key exporter described in Section 4.2 of RFC 5764 and RFC 5705 |
| 592 | * (this is implemented in the SSL example programs). |
| 593 | * The resulting key should then be passed to an SRTP stack. |
| 594 | * |
| 595 | * Setting this option enables the runtime API |
| 596 | * mbedtls_ssl_conf_dtls_srtp_protection_profiles() |
| 597 | * through which the supported DTLS-SRTP protection |
| 598 | * profiles can be configured. You must call this API at |
| 599 | * runtime if you wish to negotiate the use of DTLS-SRTP. |
| 600 | * |
| 601 | * Requires: MBEDTLS_SSL_PROTO_DTLS |
| 602 | * |
| 603 | * Uncomment this to enable support for use_srtp extension. |
| 604 | */ |
| 605 | //#define MBEDTLS_SSL_DTLS_SRTP |
| 606 | |
| 607 | /** |
| 608 | * \def MBEDTLS_SSL_EARLY_DATA |
| 609 | * |
| 610 | * Enable support for RFC 8446 TLS 1.3 early data. |
| 611 | * |
| 612 | * Requires: MBEDTLS_SSL_SESSION_TICKETS and either |
| 613 | * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED or |
| 614 | * MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED |
| 615 | * |
| 616 | * Comment this to disable support for early data. If MBEDTLS_SSL_PROTO_TLS1_3 |
| 617 | * is not enabled, this option does not have any effect on the build. |
| 618 | * |
| 619 | * \note The maximum amount of early data can be set with |
| 620 | * MBEDTLS_SSL_MAX_EARLY_DATA_SIZE. |
| 621 | * |
| 622 | */ |
| 623 | //#define MBEDTLS_SSL_EARLY_DATA |
| 624 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 625 | /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC |
Manuel Pégourié-Gonnard | 699cafa | 2014-10-27 13:57:03 +0100 | [diff] [blame] | 626 | * |
| 627 | * Enable support for Encrypt-then-MAC, RFC 7366. |
| 628 | * |
| 629 | * This allows peers that both support it to use a more robust protection for |
| 630 | * ciphersuites using CBC, providing deep resistance against timing attacks |
| 631 | * on the padding or underlying cipher. |
| 632 | * |
| 633 | * This only affects CBC ciphersuites, and is useless if none is defined. |
| 634 | * |
TRodziewicz | 0f82ec6 | 2021-05-12 17:49:18 +0200 | [diff] [blame] | 635 | * Requires: MBEDTLS_SSL_PROTO_TLS1_2 |
Manuel Pégourié-Gonnard | 699cafa | 2014-10-27 13:57:03 +0100 | [diff] [blame] | 636 | * |
| 637 | * Comment this macro to disable support for Encrypt-then-MAC |
| 638 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 639 | #define MBEDTLS_SSL_ENCRYPT_THEN_MAC |
Manuel Pégourié-Gonnard | 699cafa | 2014-10-27 13:57:03 +0100 | [diff] [blame] | 640 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 641 | /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 642 | * |
Manuel Pégourié-Gonnard | bca8aa0 | 2020-03-24 12:11:49 +0100 | [diff] [blame] | 643 | * Enable support for RFC 7627: Session Hash and Extended Master Secret |
| 644 | * Extension. |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 645 | * |
Shaun Case | 8b0ecbc | 2021-12-20 21:14:10 -0800 | [diff] [blame] | 646 | * This was introduced as "the proper fix" to the Triple Handshake family of |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 647 | * attacks, but it is recommended to always use it (even if you disable |
| 648 | * renegotiation), since it actually fixes a more fundamental issue in the |
| 649 | * original SSL/TLS design, and has implications beyond Triple Handshake. |
| 650 | * |
TRodziewicz | 0f82ec6 | 2021-05-12 17:49:18 +0200 | [diff] [blame] | 651 | * Requires: MBEDTLS_SSL_PROTO_TLS1_2 |
Manuel Pégourié-Gonnard | 769c6b6 | 2014-10-28 14:13:55 +0100 | [diff] [blame] | 652 | * |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 653 | * Comment this macro to disable support for Extended Master Secret. |
| 654 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 655 | #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 656 | |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 657 | /** |
Hanno Becker | bb278f5 | 2019-02-05 17:04:00 +0000 | [diff] [blame] | 658 | * \def MBEDTLS_SSL_KEEP_PEER_CERTIFICATE |
| 659 | * |
Hanno Becker | fd7f298 | 2019-02-25 10:13:33 +0000 | [diff] [blame] | 660 | * This option controls the availability of the API mbedtls_ssl_get_peer_cert() |
Hanno Becker | bb278f5 | 2019-02-05 17:04:00 +0000 | [diff] [blame] | 661 | * giving access to the peer's certificate after completion of the handshake. |
| 662 | * |
| 663 | * Unless you need mbedtls_ssl_peer_cert() in your application, it is |
| 664 | * recommended to disable this option for reduced RAM usage. |
| 665 | * |
| 666 | * \note If this option is disabled, mbedtls_ssl_get_peer_cert() is still |
| 667 | * defined, but always returns \c NULL. |
| 668 | * |
| 669 | * \note This option has no influence on the protection against the |
| 670 | * triple handshake attack. Even if it is disabled, Mbed TLS will |
| 671 | * still ensure that certificates do not change during renegotiation, |
Shaun Case | 8b0ecbc | 2021-12-20 21:14:10 -0800 | [diff] [blame] | 672 | * for example by keeping a hash of the peer's certificate. |
Hanno Becker | bb278f5 | 2019-02-05 17:04:00 +0000 | [diff] [blame] | 673 | * |
Tom Cosgrove | afb2fe1 | 2022-06-29 16:36:12 +0100 | [diff] [blame] | 674 | * \note This option is required if MBEDTLS_SSL_PROTO_TLS1_3 is set. |
Hanno Becker | bb278f5 | 2019-02-05 17:04:00 +0000 | [diff] [blame] | 675 | * |
| 676 | * Comment this macro to disable storing the peer's certificate |
| 677 | * after the handshake. |
| 678 | */ |
| 679 | #define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE |
| 680 | |
| 681 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 682 | * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
Paul Bakker | 05decb2 | 2013-08-15 13:33:48 +0200 | [diff] [blame] | 683 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 684 | * Enable support for RFC 6066 max_fragment_length extension in SSL. |
Paul Bakker | 05decb2 | 2013-08-15 13:33:48 +0200 | [diff] [blame] | 685 | * |
| 686 | * Comment this macro to disable support for the max_fragment_length extension |
| 687 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 688 | #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
Paul Bakker | 05decb2 | 2013-08-15 13:33:48 +0200 | [diff] [blame] | 689 | |
| 690 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 691 | * \def MBEDTLS_SSL_PROTO_DTLS |
Jan Bruckner | 151f642 | 2023-02-10 12:45:19 +0100 | [diff] [blame] | 692 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 693 | * Enable support for DTLS (all available versions). |
Jan Bruckner | 151f642 | 2023-02-10 12:45:19 +0100 | [diff] [blame] | 694 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 695 | * Enable this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2. |
Jan Bruckner | 151f642 | 2023-02-10 12:45:19 +0100 | [diff] [blame] | 696 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 697 | * Requires: MBEDTLS_SSL_PROTO_TLS1_2 |
| 698 | * |
| 699 | * Comment this macro to disable support for DTLS |
Jan Bruckner | 151f642 | 2023-02-10 12:45:19 +0100 | [diff] [blame] | 700 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 701 | #define MBEDTLS_SSL_PROTO_DTLS |
Jan Bruckner | 151f642 | 2023-02-10 12:45:19 +0100 | [diff] [blame] | 702 | |
| 703 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 704 | * \def MBEDTLS_SSL_PROTO_TLS1_2 |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 705 | * |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 706 | * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled). |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 707 | * |
Janos Follath | 277bba8 | 2024-11-19 16:14:00 +0000 | [diff] [blame] | 708 | * Requires: PSA_WANT_ALG_SHA_256 or PSA_WANT_ALG_SHA_384 |
Andrzej Kurek | e02da81 | 2022-08-17 17:04:49 -0400 | [diff] [blame] | 709 | * |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 710 | * Comment this macro to disable support for TLS 1.2 / DTLS 1.2 |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 711 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 712 | #define MBEDTLS_SSL_PROTO_TLS1_2 |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 713 | |
| 714 | /** |
Ronald Cron | 6f135e1 | 2021-12-08 16:57:54 +0100 | [diff] [blame] | 715 | * \def MBEDTLS_SSL_PROTO_TLS1_3 |
Hanno Becker | 9fc15ea | 2020-05-04 12:00:47 +0100 | [diff] [blame] | 716 | * |
Ronald Cron | 6f135e1 | 2021-12-08 16:57:54 +0100 | [diff] [blame] | 717 | * Enable support for TLS 1.3. |
Hanno Becker | 9fc15ea | 2020-05-04 12:00:47 +0100 | [diff] [blame] | 718 | * |
Gilles Peskine | da69eaa | 2023-09-05 20:54:17 +0200 | [diff] [blame] | 719 | * \note See docs/architecture/tls13-support.md for a description of the TLS |
Ronald Cron | 6f135e1 | 2021-12-08 16:57:54 +0100 | [diff] [blame] | 720 | * 1.3 support that this option enables. |
Hanno Becker | 9fc15ea | 2020-05-04 12:00:47 +0100 | [diff] [blame] | 721 | * |
Tom Cosgrove | afb2fe1 | 2022-06-29 16:36:12 +0100 | [diff] [blame] | 722 | * Requires: MBEDTLS_SSL_KEEP_PEER_CERTIFICATE |
Manuel Pégourié-Gonnard | 3e83098 | 2022-05-11 13:27:44 +0200 | [diff] [blame] | 723 | * Requires: MBEDTLS_PSA_CRYPTO_C |
Ronald Cron | 6f135e1 | 2021-12-08 16:57:54 +0100 | [diff] [blame] | 724 | * |
Hanno Becker | 9fc15ea | 2020-05-04 12:00:47 +0100 | [diff] [blame] | 725 | * Uncomment this macro to enable the support for TLS 1.3. |
Hanno Becker | 9fc15ea | 2020-05-04 12:00:47 +0100 | [diff] [blame] | 726 | */ |
Ronald Cron | 27eb68d | 2024-03-15 16:13:37 +0100 | [diff] [blame] | 727 | #define MBEDTLS_SSL_PROTO_TLS1_3 |
Hanno Becker | 9fc15ea | 2020-05-04 12:00:47 +0100 | [diff] [blame] | 728 | |
| 729 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 730 | * \def MBEDTLS_SSL_RECORD_SIZE_LIMIT |
| 731 | * |
| 732 | * Enable support for RFC 8449 record_size_limit extension in SSL (TLS 1.3 only). |
| 733 | * |
| 734 | * Requires: MBEDTLS_SSL_PROTO_TLS1_3 |
| 735 | * |
| 736 | * Uncomment this macro to enable support for the record_size_limit extension |
| 737 | */ |
| 738 | //#define MBEDTLS_SSL_RECORD_SIZE_LIMIT |
| 739 | |
Max Fillinger | 7577c9e | 2025-01-17 14:10:08 +0100 | [diff] [blame] | 740 | /** |
Max Fillinger | 2fe35f6 | 2024-10-25 00:52:24 +0200 | [diff] [blame] | 741 | * \def MBEDTLS_SSL_KEYING_MATERIAL_EXPORT |
| 742 | * |
| 743 | * When this option is enabled, the client and server can extract additional |
| 744 | * shared symmetric keys after an SSL handshake using the function |
| 745 | * mbedtls_ssl_export_keying_material(). |
| 746 | * |
| 747 | * The process for deriving the keys is specified in RFC 5705 for TLS 1.2 and |
| 748 | * in RFC 8446, Section 7.5, for TLS 1.3. |
| 749 | * |
Max Fillinger | 51bec54 | 2024-10-28 13:14:39 +0100 | [diff] [blame] | 750 | * Comment this macro to disable mbedtls_ssl_export_keying_material(). |
Max Fillinger | 2fe35f6 | 2024-10-25 00:52:24 +0200 | [diff] [blame] | 751 | */ |
Max Fillinger | 51bec54 | 2024-10-28 13:14:39 +0100 | [diff] [blame] | 752 | #define MBEDTLS_SSL_KEYING_MATERIAL_EXPORT |
Max Fillinger | 2fe35f6 | 2024-10-25 00:52:24 +0200 | [diff] [blame] | 753 | |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 754 | /** |
| 755 | * \def MBEDTLS_SSL_RENEGOTIATION |
| 756 | * |
| 757 | * Enable support for TLS renegotiation. |
| 758 | * |
| 759 | * The two main uses of renegotiation are (1) refresh keys on long-lived |
| 760 | * connections and (2) client authentication after the initial handshake. |
| 761 | * If you don't need renegotiation, it's probably better to disable it, since |
| 762 | * it has been associated with security issues in the past and is easy to |
| 763 | * misuse/misunderstand. |
| 764 | * |
| 765 | * Requires: MBEDTLS_SSL_PROTO_TLS1_2 |
| 766 | * |
| 767 | * Comment this to disable support for renegotiation. |
| 768 | * |
| 769 | * \note Even if this option is disabled, both client and server are aware |
| 770 | * of the Renegotiation Indication Extension (RFC 5746) used to |
| 771 | * prevent the SSL renegotiation attack (see RFC 5746 Sect. 1). |
| 772 | * (See \c mbedtls_ssl_conf_legacy_renegotiation for the |
| 773 | * configuration of this extension). |
| 774 | * |
| 775 | */ |
| 776 | #define MBEDTLS_SSL_RENEGOTIATION |
| 777 | |
| 778 | /** |
| 779 | * \def MBEDTLS_SSL_SERVER_NAME_INDICATION |
| 780 | * |
| 781 | * Enable support for RFC 6066 server name indication (SNI) in SSL. |
| 782 | * |
| 783 | * Requires: MBEDTLS_X509_CRT_PARSE_C |
| 784 | * |
| 785 | * Comment this macro to disable support for server name indication in SSL |
| 786 | */ |
| 787 | #define MBEDTLS_SSL_SERVER_NAME_INDICATION |
| 788 | |
| 789 | /** |
| 790 | * \def MBEDTLS_SSL_SESSION_TICKETS |
| 791 | * |
| 792 | * Enable support for RFC 5077 session tickets in SSL. |
| 793 | * Client-side, provides full support for session tickets (maintenance of a |
| 794 | * session store remains the responsibility of the application, though). |
| 795 | * Server-side, you also need to provide callbacks for writing and parsing |
| 796 | * tickets, including authenticated encryption and key management. Example |
| 797 | * callbacks are provided by MBEDTLS_SSL_TICKET_C. |
| 798 | * |
| 799 | * Comment this macro to disable support for SSL session tickets |
| 800 | */ |
| 801 | #define MBEDTLS_SSL_SESSION_TICKETS |
| 802 | |
| 803 | /** |
| 804 | * \def MBEDTLS_SSL_SRV_C |
| 805 | * |
| 806 | * Enable the SSL/TLS server code. |
| 807 | * |
| 808 | * Module: library/ssl*_server.c |
| 809 | * Caller: |
| 810 | * |
| 811 | * Requires: MBEDTLS_SSL_TLS_C |
| 812 | * |
| 813 | * \warning You must call psa_crypto_init() before doing any TLS operations. |
| 814 | * |
| 815 | * This module is required for SSL/TLS server support. |
| 816 | */ |
| 817 | #define MBEDTLS_SSL_SRV_C |
| 818 | |
| 819 | /** |
| 820 | * \def MBEDTLS_SSL_TICKET_C |
| 821 | * |
| 822 | * Enable an implementation of TLS server-side callbacks for session tickets. |
| 823 | * |
| 824 | * Module: library/ssl_ticket.c |
| 825 | * Caller: |
| 826 | * |
Manuel Pégourié-Gonnard | 28905b7 | 2025-01-23 11:43:15 +0100 | [diff] [blame] | 827 | * Requires: MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 828 | */ |
| 829 | #define MBEDTLS_SSL_TICKET_C |
| 830 | |
| 831 | /** |
Ronald Cron | ab65c52 | 2021-11-24 10:47:20 +0100 | [diff] [blame] | 832 | * \def MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE |
| 833 | * |
| 834 | * Enable TLS 1.3 middlebox compatibility mode. |
| 835 | * |
| 836 | * As specified in Section D.4 of RFC 8446, TLS 1.3 offers a compatibility |
| 837 | * mode to make a TLS 1.3 connection more likely to pass through middle boxes |
| 838 | * expecting TLS 1.2 traffic. |
| 839 | * |
| 840 | * Turning on the compatibility mode comes at the cost of a few added bytes |
| 841 | * on the wire, but it doesn't affect compatibility with TLS 1.3 implementations |
| 842 | * that don't use it. Therefore, unless transmission bandwidth is critical and |
| 843 | * you know that middlebox compatibility issues won't occur, it is therefore |
| 844 | * recommended to set this option. |
| 845 | * |
| 846 | * Comment to disable compatibility mode for TLS 1.3. If |
Ronald Cron | 6f135e1 | 2021-12-08 16:57:54 +0100 | [diff] [blame] | 847 | * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any |
| 848 | * effect on the build. |
Ronald Cron | ab65c52 | 2021-11-24 10:47:20 +0100 | [diff] [blame] | 849 | * |
| 850 | */ |
Ronald Cron | 27eb68d | 2024-03-15 16:13:37 +0100 | [diff] [blame] | 851 | #define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE |
Ronald Cron | ab65c52 | 2021-11-24 10:47:20 +0100 | [diff] [blame] | 852 | |
| 853 | /** |
Ronald Cron | d8d2ea5 | 2022-10-04 15:48:06 +0200 | [diff] [blame] | 854 | * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED |
| 855 | * |
| 856 | * Enable TLS 1.3 ephemeral key exchange mode. |
| 857 | * |
Przemek Stekiel | ce05f54 | 2023-06-15 16:44:08 +0200 | [diff] [blame] | 858 | * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH |
Manuel Pégourié-Gonnard | 4fa702a | 2023-03-29 12:15:24 +0200 | [diff] [blame] | 859 | * MBEDTLS_X509_CRT_PARSE_C |
| 860 | * and at least one of: |
Janos Follath | 277bba8 | 2024-11-19 16:14:00 +0000 | [diff] [blame] | 861 | * MBEDTLS_ECDSA_C or PSA_WANT_ALG_ECDSA |
Manuel Pégourié-Gonnard | 4fa702a | 2023-03-29 12:15:24 +0200 | [diff] [blame] | 862 | * MBEDTLS_PKCS1_V21 |
Ronald Cron | d8d2ea5 | 2022-10-04 15:48:06 +0200 | [diff] [blame] | 863 | * |
| 864 | * Comment to disable support for the ephemeral key exchange mode in TLS 1.3. |
| 865 | * If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any |
| 866 | * effect on the build. |
| 867 | * |
| 868 | */ |
| 869 | #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED |
| 870 | |
| 871 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 872 | * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 873 | * |
| 874 | * Enable TLS 1.3 PSK key exchange mode. |
| 875 | * |
| 876 | * Comment to disable support for the PSK key exchange mode in TLS 1.3. If |
| 877 | * MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not have any |
| 878 | * effect on the build. |
| 879 | * |
| 880 | */ |
| 881 | #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 882 | |
| 883 | /** |
Ronald Cron | d8d2ea5 | 2022-10-04 15:48:06 +0200 | [diff] [blame] | 884 | * \def MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED |
| 885 | * |
| 886 | * Enable TLS 1.3 PSK ephemeral key exchange mode. |
| 887 | * |
Przemek Stekiel | ce05f54 | 2023-06-15 16:44:08 +0200 | [diff] [blame] | 888 | * Requires: PSA_WANT_ALG_ECDH or PSA_WANT_ALG_FFDH |
Ronald Cron | d8d2ea5 | 2022-10-04 15:48:06 +0200 | [diff] [blame] | 889 | * |
| 890 | * Comment to disable support for the PSK ephemeral key exchange mode in |
| 891 | * TLS 1.3. If MBEDTLS_SSL_PROTO_TLS1_3 is not enabled, this option does not |
| 892 | * have any effect on the build. |
| 893 | * |
| 894 | */ |
| 895 | #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED |
| 896 | |
| 897 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 898 | * \def MBEDTLS_SSL_TLS_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 899 | * |
Paul Bakker | e29ab06 | 2011-05-18 13:26:54 +0000 | [diff] [blame] | 900 | * Enable the generic SSL/TLS code. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 901 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 902 | * Module: library/ssl_tls.c |
Ronald Cron | de1adee | 2022-03-07 16:20:30 +0100 | [diff] [blame] | 903 | * Caller: library/ssl*_client.c |
| 904 | * library/ssl*_server.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 905 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 906 | * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C |
| 907 | * and at least one of the MBEDTLS_SSL_PROTO_XXX defines |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 908 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 909 | * This module is required for SSL/TLS. |
| 910 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 911 | #define MBEDTLS_SSL_TLS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 912 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 913 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 914 | * \def MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 915 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 916 | * When this option is enabled, the SSL buffer will be resized automatically |
| 917 | * based on the negotiated maximum fragment length in each direction. |
Manuel Pégourié-Gonnard | 325ce09 | 2016-02-22 10:33:34 +0100 | [diff] [blame] | 918 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 919 | * Requires: MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
Paul Bakker | ecd54fb | 2013-07-03 14:48:29 +0200 | [diff] [blame] | 920 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 921 | //#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 922 | |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 923 | //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 or 384 bits) */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 924 | //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 925 | //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ |
Angus Gratton | d8213d0 | 2016-05-25 20:56:48 +1000 | [diff] [blame] | 926 | |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 927 | /** \def MBEDTLS_SSL_CID_IN_LEN_MAX |
| 928 | * |
| 929 | * The maximum length of CIDs used for incoming DTLS messages. |
| 930 | * |
| 931 | */ |
| 932 | //#define MBEDTLS_SSL_CID_IN_LEN_MAX 32 |
| 933 | |
| 934 | /** \def MBEDTLS_SSL_CID_OUT_LEN_MAX |
| 935 | * |
| 936 | * The maximum length of CIDs used for outgoing DTLS messages. |
| 937 | * |
| 938 | */ |
| 939 | //#define MBEDTLS_SSL_CID_OUT_LEN_MAX 32 |
| 940 | |
TRodziewicz | e8dd709 | 2021-05-12 14:19:11 +0200 | [diff] [blame] | 941 | /** \def MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY |
Gilles Peskine | d3d0290 | 2020-03-04 21:35:27 +0100 | [diff] [blame] | 942 | * |
| 943 | * This option controls the use of record plaintext padding |
TRodziewicz | 1e660ed | 2021-05-26 17:08:54 +0200 | [diff] [blame] | 944 | * in TLS 1.3 and when using the Connection ID extension in DTLS 1.2. |
Hanno Becker | 1399692 | 2020-05-28 16:15:19 +0100 | [diff] [blame] | 945 | * |
| 946 | * The padding will always be chosen so that the length of the |
| 947 | * padded plaintext is a multiple of the value of this option. |
| 948 | * |
| 949 | * Note: A value of \c 1 means that no padding will be used |
| 950 | * for outgoing records. |
| 951 | * |
| 952 | * Note: On systems lacking division instructions, |
| 953 | * a power of two should be preferred. |
| 954 | */ |
TRodziewicz | e8dd709 | 2021-05-12 14:19:11 +0200 | [diff] [blame] | 955 | //#define MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 16 |
Hanno Becker | 1399692 | 2020-05-28 16:15:19 +0100 | [diff] [blame] | 956 | |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 957 | /** |
| 958 | * Complete list of ciphersuites to use, in order of preference. |
| 959 | * |
| 960 | * \warning No dependency checking is done on that field! This option can only |
| 961 | * be used to restrict the set of available ciphersuites. It is your |
| 962 | * responsibility to make sure the needed modules are active. |
| 963 | * |
| 964 | * Use this to save a few hundred bytes of ROM (default ordering of all |
| 965 | * available ciphersuites) and a few to a few hundred bytes of RAM. |
| 966 | * |
| 967 | * The value below is only an example, not the default. |
| 968 | */ |
| 969 | //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 970 | |
| 971 | //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ |
| 972 | |
| 973 | /** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING |
| 974 | * |
| 975 | * Maximum number of heap-allocated bytes for the purpose of |
| 976 | * DTLS handshake message reassembly and future message buffering. |
| 977 | * |
| 978 | * This should be at least 9/8 * MBEDTLS_SSL_IN_CONTENT_LEN |
| 979 | * to account for a reassembled handshake message of maximum size, |
| 980 | * together with its reassembly bitmap. |
| 981 | * |
| 982 | * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default) |
| 983 | * should be sufficient for all practical situations as it allows |
| 984 | * to reassembly a large handshake message (such as a certificate) |
| 985 | * while buffering multiple smaller handshake messages. |
| 986 | * |
| 987 | */ |
| 988 | //#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768 |
| 989 | |
| 990 | /** \def MBEDTLS_SSL_IN_CONTENT_LEN |
| 991 | * |
| 992 | * Maximum length (in bytes) of incoming plaintext fragments. |
| 993 | * |
| 994 | * This determines the size of the incoming TLS I/O buffer in such a way |
| 995 | * that it is capable of holding the specified amount of plaintext data, |
| 996 | * regardless of the protection mechanism used. |
| 997 | * |
| 998 | * \note When using a value less than the default of 16KB on the client, it is |
| 999 | * recommended to use the Maximum Fragment Length (MFL) extension to |
| 1000 | * inform the server about this limitation. On the server, there |
| 1001 | * is no supported, standardized way of informing the client about |
| 1002 | * restriction on the maximum size of incoming messages, and unless |
| 1003 | * the limitation has been communicated by other means, it is recommended |
| 1004 | * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN |
| 1005 | * while keeping the default value of 16KB for the incoming buffer. |
| 1006 | * |
| 1007 | * Uncomment to set the maximum plaintext size of the incoming I/O buffer. |
| 1008 | */ |
| 1009 | //#define MBEDTLS_SSL_IN_CONTENT_LEN 16384 |
| 1010 | |
| 1011 | /** |
| 1012 | * \def MBEDTLS_SSL_MAX_EARLY_DATA_SIZE |
| 1013 | * |
| 1014 | * The default maximum amount of 0-RTT data. See the documentation of |
| 1015 | * \c mbedtls_ssl_conf_max_early_data_size() for more information. |
| 1016 | * |
| 1017 | * It must be positive and smaller than UINT32_MAX. |
| 1018 | * |
| 1019 | * If MBEDTLS_SSL_EARLY_DATA is not defined, this default value does not |
| 1020 | * have any impact on the build. |
| 1021 | */ |
| 1022 | //#define MBEDTLS_SSL_MAX_EARLY_DATA_SIZE 1024 |
| 1023 | |
Angus Gratton | d8213d0 | 2016-05-25 20:56:48 +1000 | [diff] [blame] | 1024 | /** \def MBEDTLS_SSL_OUT_CONTENT_LEN |
| 1025 | * |
Andrzej Kurek | c470b6b | 2019-01-31 08:20:20 -0500 | [diff] [blame] | 1026 | * Maximum length (in bytes) of outgoing plaintext fragments. |
Angus Gratton | d8213d0 | 2016-05-25 20:56:48 +1000 | [diff] [blame] | 1027 | * |
Andrzej Kurek | c470b6b | 2019-01-31 08:20:20 -0500 | [diff] [blame] | 1028 | * This determines the size of the outgoing TLS I/O buffer in such a way |
| 1029 | * that it is capable of holding the specified amount of plaintext data, |
| 1030 | * regardless of the protection mechanism used. |
| 1031 | * |
Angus Gratton | d8213d0 | 2016-05-25 20:56:48 +1000 | [diff] [blame] | 1032 | * It is possible to save RAM by setting a smaller outward buffer, while keeping |
| 1033 | * the default inward 16384 byte buffer to conform to the TLS specification. |
| 1034 | * |
| 1035 | * The minimum required outward buffer size is determined by the handshake |
| 1036 | * protocol's usage. Handshaking will fail if the outward buffer is too small. |
| 1037 | * The specific size requirement depends on the configured ciphers and any |
| 1038 | * certificate data which is sent during the handshake. |
| 1039 | * |
David Horstmann | 95d516f | 2021-05-04 18:36:56 +0100 | [diff] [blame] | 1040 | * Uncomment to set the maximum plaintext size of the outgoing I/O buffer. |
Angus Gratton | d8213d0 | 2016-05-25 20:56:48 +1000 | [diff] [blame] | 1041 | */ |
| 1042 | //#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384 |
| 1043 | |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 1044 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1045 | * \def MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 1046 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1047 | * Default number of NewSessionTicket messages to be sent by a TLS 1.3 server |
| 1048 | * after handshake completion. This is not used in TLS 1.2 and relevant only if |
| 1049 | * the MBEDTLS_SSL_SESSION_TICKETS option is enabled. |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 1050 | * |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 1051 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1052 | //#define MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS 1 |
Tom Cosgrove | a63775b | 2023-09-14 13:31:19 +0100 | [diff] [blame] | 1053 | |
| 1054 | /** |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1055 | * \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE |
| 1056 | * |
Jerry Yu | cf91351 | 2023-11-14 11:06:52 +0800 | [diff] [blame] | 1057 | * Maximum allowed ticket age difference in milliseconds tolerated between |
Jerry Yu | 034a8b7 | 2023-11-10 12:20:19 +0800 | [diff] [blame] | 1058 | * server and client. Default value is 6000. This is not used in TLS 1.2. |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1059 | * |
Jerry Yu | 034a8b7 | 2023-11-10 12:20:19 +0800 | [diff] [blame] | 1060 | * - The client ticket age is the time difference between the time when the |
| 1061 | * client proposes to the server to use the ticket and the time the client |
| 1062 | * received the ticket from the server. |
| 1063 | * - The server ticket age is the time difference between the time when the |
| 1064 | * server receives a proposition from the client to use the ticket and the |
| 1065 | * time when the ticket was created by the server. |
| 1066 | * |
Jerry Yu | cf91351 | 2023-11-14 11:06:52 +0800 | [diff] [blame] | 1067 | * The ages might be different due to the client and server clocks not running |
| 1068 | * at the same pace. The typical accuracy of an RTC crystal is ±100 to ±20 parts |
| 1069 | * per million (360 to 72 milliseconds per hour). Default tolerance window is |
| 1070 | * 6s, thus in the worst case clients and servers must sync up their system time |
| 1071 | * every 6000/360/2~=8 hours. |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1072 | * |
Jerry Yu | 04fceb7 | 2023-11-15 09:52:46 +0800 | [diff] [blame] | 1073 | * See section 8.3 of the TLS 1.3 specification(RFC 8446) for more information. |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1074 | */ |
Gilles Peskine | d65ea42 | 2023-09-05 21:07:32 +0200 | [diff] [blame] | 1075 | //#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000 |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1076 | |
Minos Galanakis | 1bf85a8 | 2024-12-12 16:29:38 +0000 | [diff] [blame] | 1077 | /** |
| 1078 | * \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH |
| 1079 | * |
| 1080 | * Size in bytes of a ticket nonce. This is not used in TLS 1.2. |
| 1081 | * |
| 1082 | * This must be less than 256. |
| 1083 | */ |
| 1084 | //#define MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH 32 |
| 1085 | |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1086 | /** \} name SECTION: TLS feature selection */ |
| 1087 | |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1088 | /** |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1089 | * \name SECTION: X.509 feature selection |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1090 | * |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1091 | * This section sets Certificate related options. |
| 1092 | * \{ |
Gilles Peskine | a8d7e43 | 2022-08-04 23:39:41 +0200 | [diff] [blame] | 1093 | */ |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1094 | |
| 1095 | /** |
| 1096 | * \def MBEDTLS_PKCS7_C |
| 1097 | * |
| 1098 | * Enable PKCS #7 core for using PKCS #7-formatted signatures. |
| 1099 | * RFC Link - https://tools.ietf.org/html/rfc2315 |
| 1100 | * |
| 1101 | * Module: library/pkcs7.c |
| 1102 | * |
Gilles Peskine | 02ec585 | 2025-05-12 20:52:07 +0200 | [diff] [blame] | 1103 | * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_PK_PARSE_C, |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1104 | * MBEDTLS_X509_CRT_PARSE_C MBEDTLS_X509_CRL_PARSE_C, |
| 1105 | * MBEDTLS_BIGNUM_C, MBEDTLS_MD_C |
| 1106 | * |
| 1107 | * This module is required for the PKCS #7 parsing modules. |
| 1108 | */ |
| 1109 | #define MBEDTLS_PKCS7_C |
| 1110 | |
| 1111 | /** |
| 1112 | * \def MBEDTLS_X509_CREATE_C |
| 1113 | * |
| 1114 | * Enable X.509 core for creating certificates. |
| 1115 | * |
| 1116 | * Module: library/x509_create.c |
| 1117 | * |
Gilles Peskine | 02ec585 | 2025-05-12 20:52:07 +0200 | [diff] [blame] | 1118 | * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_PK_PARSE_C, |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1119 | * |
| 1120 | * \warning You must call psa_crypto_init() before doing any X.509 operation. |
| 1121 | * |
| 1122 | * This module is the basis for creating X.509 certificates and CSRs. |
| 1123 | */ |
| 1124 | #define MBEDTLS_X509_CREATE_C |
| 1125 | |
| 1126 | /** |
| 1127 | * \def MBEDTLS_X509_CRL_PARSE_C |
| 1128 | * |
| 1129 | * Enable X.509 CRL parsing. |
| 1130 | * |
| 1131 | * Module: library/x509_crl.c |
| 1132 | * Caller: library/x509_crt.c |
| 1133 | * |
| 1134 | * Requires: MBEDTLS_X509_USE_C |
| 1135 | * |
| 1136 | * This module is required for X.509 CRL parsing. |
| 1137 | */ |
| 1138 | #define MBEDTLS_X509_CRL_PARSE_C |
| 1139 | |
| 1140 | /** |
| 1141 | * \def MBEDTLS_X509_CRT_PARSE_C |
| 1142 | * |
| 1143 | * Enable X.509 certificate parsing. |
| 1144 | * |
| 1145 | * Module: library/x509_crt.c |
| 1146 | * Caller: library/ssl_tls.c |
| 1147 | * library/ssl*_client.c |
| 1148 | * library/ssl*_server.c |
| 1149 | * |
| 1150 | * Requires: MBEDTLS_X509_USE_C |
| 1151 | * |
| 1152 | * This module is required for X.509 certificate parsing. |
| 1153 | */ |
| 1154 | #define MBEDTLS_X509_CRT_PARSE_C |
| 1155 | |
| 1156 | /** |
| 1157 | * \def MBEDTLS_X509_CRT_WRITE_C |
| 1158 | * |
| 1159 | * Enable creating X.509 certificates. |
| 1160 | * |
| 1161 | * Module: library/x509_crt_write.c |
| 1162 | * |
| 1163 | * Requires: MBEDTLS_X509_CREATE_C |
| 1164 | * |
| 1165 | * This module is required for X.509 certificate creation. |
| 1166 | */ |
| 1167 | #define MBEDTLS_X509_CRT_WRITE_C |
| 1168 | |
| 1169 | /** |
| 1170 | * \def MBEDTLS_X509_CSR_PARSE_C |
| 1171 | * |
| 1172 | * Enable X.509 Certificate Signing Request (CSR) parsing. |
| 1173 | * |
| 1174 | * Module: library/x509_csr.c |
| 1175 | * Caller: library/x509_crt_write.c |
| 1176 | * |
| 1177 | * Requires: MBEDTLS_X509_USE_C |
| 1178 | * |
| 1179 | * This module is used for reading X.509 certificate request. |
| 1180 | */ |
| 1181 | #define MBEDTLS_X509_CSR_PARSE_C |
| 1182 | |
| 1183 | /** |
| 1184 | * \def MBEDTLS_X509_CSR_WRITE_C |
| 1185 | * |
| 1186 | * Enable creating X.509 Certificate Signing Requests (CSR). |
| 1187 | * |
| 1188 | * Module: library/x509_csr_write.c |
| 1189 | * |
| 1190 | * Requires: MBEDTLS_X509_CREATE_C |
| 1191 | * |
| 1192 | * This module is required for X.509 certificate request writing. |
| 1193 | */ |
| 1194 | #define MBEDTLS_X509_CSR_WRITE_C |
| 1195 | |
| 1196 | /** |
| 1197 | * \def MBEDTLS_X509_REMOVE_INFO |
| 1198 | * |
| 1199 | * Disable mbedtls_x509_*_info() and related APIs. |
| 1200 | * |
| 1201 | * Uncomment to omit mbedtls_x509_*_info(), as well as mbedtls_debug_print_crt() |
| 1202 | * and other functions/constants only used by these functions, thus reducing |
| 1203 | * the code footprint by several KB. |
| 1204 | */ |
| 1205 | //#define MBEDTLS_X509_REMOVE_INFO |
| 1206 | |
| 1207 | /** |
| 1208 | * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 1209 | * |
| 1210 | * Enable parsing and verification of X.509 certificates, CRLs and CSRS |
| 1211 | * signed with RSASSA-PSS (aka PKCS#1 v2.1). |
| 1212 | * |
| 1213 | * Requires: MBEDTLS_PKCS1_V21 |
| 1214 | * |
| 1215 | * Comment this macro to disallow using RSASSA-PSS in certificates. |
| 1216 | */ |
| 1217 | #define MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 1218 | |
| 1219 | /** |
| 1220 | * \def MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK |
| 1221 | * |
| 1222 | * If set, this enables the X.509 API `mbedtls_x509_crt_verify_with_ca_cb()` |
| 1223 | * and the SSL API `mbedtls_ssl_conf_ca_cb()` which allow users to configure |
| 1224 | * the set of trusted certificates through a callback instead of a linked |
| 1225 | * list. |
| 1226 | * |
| 1227 | * This is useful for example in environments where a large number of trusted |
| 1228 | * certificates is present and storing them in a linked list isn't efficient |
| 1229 | * enough, or when the set of trusted certificates changes frequently. |
| 1230 | * |
| 1231 | * See the documentation of `mbedtls_x509_crt_verify_with_ca_cb()` and |
| 1232 | * `mbedtls_ssl_conf_ca_cb()` for more information. |
| 1233 | * |
| 1234 | * Requires: MBEDTLS_X509_CRT_PARSE_C |
| 1235 | * |
| 1236 | * Uncomment to enable trusted certificate callbacks. |
| 1237 | */ |
| 1238 | //#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK |
| 1239 | |
| 1240 | /** |
| 1241 | * \def MBEDTLS_X509_USE_C |
| 1242 | * |
| 1243 | * Enable X.509 core for using certificates. |
| 1244 | * |
| 1245 | * Module: library/x509.c |
| 1246 | * Caller: library/x509_crl.c |
| 1247 | * library/x509_crt.c |
| 1248 | * library/x509_csr.c |
| 1249 | * |
Gilles Peskine | 02ec585 | 2025-05-12 20:52:07 +0200 | [diff] [blame] | 1250 | * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_PK_PARSE_C |
Minos Galanakis | 80e76b6 | 2024-12-12 15:46:29 +0000 | [diff] [blame] | 1251 | * |
| 1252 | * \warning You must call psa_crypto_init() before doing any X.509 operation. |
| 1253 | * |
| 1254 | * This module is required for the X.509 parsing modules. |
| 1255 | */ |
| 1256 | #define MBEDTLS_X509_USE_C |
| 1257 | |
| 1258 | //#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */ |
| 1259 | //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */ |
| 1260 | |
| 1261 | /** \} name SECTION: X.509 feature selection */ |