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