Example
Dependencies: FXAS21002 FXOS8700Q
simple-mbed-cloud-client/mbed-cloud-client/mbed-client-pal/Configs/mbedTLS/mbedTLSConfig_mbedOS.h@0:11cc2b7889af, 2019-11-19 (annotated)
- Committer:
- maygup01
- Date:
- Tue Nov 19 09:49:38 2019 +0000
- Revision:
- 0:11cc2b7889af
Example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maygup01 | 0:11cc2b7889af | 1 | // ---------------------------------------------------------------------------- |
maygup01 | 0:11cc2b7889af | 2 | // Copyright 2016-2019 ARM Ltd. |
maygup01 | 0:11cc2b7889af | 3 | // |
maygup01 | 0:11cc2b7889af | 4 | // SPDX-License-Identifier: Apache-2.0 |
maygup01 | 0:11cc2b7889af | 5 | // |
maygup01 | 0:11cc2b7889af | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); |
maygup01 | 0:11cc2b7889af | 7 | // you may not use this file except in compliance with the License. |
maygup01 | 0:11cc2b7889af | 8 | // You may obtain a copy of the License at |
maygup01 | 0:11cc2b7889af | 9 | // |
maygup01 | 0:11cc2b7889af | 10 | // http://www.apache.org/licenses/LICENSE-2.0 |
maygup01 | 0:11cc2b7889af | 11 | // |
maygup01 | 0:11cc2b7889af | 12 | // Unless required by applicable law or agreed to in writing, software |
maygup01 | 0:11cc2b7889af | 13 | // distributed under the License is distributed on an "AS IS" BASIS, |
maygup01 | 0:11cc2b7889af | 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
maygup01 | 0:11cc2b7889af | 15 | // See the License for the specific language governing permissions and |
maygup01 | 0:11cc2b7889af | 16 | // limitations under the License. |
maygup01 | 0:11cc2b7889af | 17 | // ---------------------------------------------------------------------------- |
maygup01 | 0:11cc2b7889af | 18 | |
maygup01 | 0:11cc2b7889af | 19 | #ifndef PAL_MBEDTLS_USER_CONFIG_H |
maygup01 | 0:11cc2b7889af | 20 | #define PAL_MBEDTLS_USER_CONFIG_H |
maygup01 | 0:11cc2b7889af | 21 | |
maygup01 | 0:11cc2b7889af | 22 | |
maygup01 | 0:11cc2b7889af | 23 | /*! All of the following definitions are mandatory requirements for correct |
maygup01 | 0:11cc2b7889af | 24 | * functionality of PAL TLS and Crypto components. |
maygup01 | 0:11cc2b7889af | 25 | * Please do not disable them. |
maygup01 | 0:11cc2b7889af | 26 | */ |
maygup01 | 0:11cc2b7889af | 27 | |
maygup01 | 0:11cc2b7889af | 28 | /* Platform has time function to provide time for certificates verifications */ |
maygup01 | 0:11cc2b7889af | 29 | #if 1 //Please set to 1 if you are using secure time |
maygup01 | 0:11cc2b7889af | 30 | #ifndef MBEDTLS_HAVE_TIME |
maygup01 | 0:11cc2b7889af | 31 | #define MBEDTLS_HAVE_TIME |
maygup01 | 0:11cc2b7889af | 32 | #endif //MBEDTLS_HAVE_TIME |
maygup01 | 0:11cc2b7889af | 33 | |
maygup01 | 0:11cc2b7889af | 34 | #ifndef MBEDTLS_HAVE_TIME_DATE |
maygup01 | 0:11cc2b7889af | 35 | #define MBEDTLS_HAVE_TIME_DATE |
maygup01 | 0:11cc2b7889af | 36 | #endif //MBEDTLS_HAVE_TIME_DATE |
maygup01 | 0:11cc2b7889af | 37 | |
maygup01 | 0:11cc2b7889af | 38 | #ifndef MBEDTLS_PLATFORM_TIME_ALT |
maygup01 | 0:11cc2b7889af | 39 | #define MBEDTLS_PLATFORM_TIME_ALT |
maygup01 | 0:11cc2b7889af | 40 | #endif //MBEDTLS_PLATFORM_TIME_ALT |
maygup01 | 0:11cc2b7889af | 41 | |
maygup01 | 0:11cc2b7889af | 42 | /* System support */ |
maygup01 | 0:11cc2b7889af | 43 | #ifndef MBEDTLS_HAVE_ASM |
maygup01 | 0:11cc2b7889af | 44 | #define MBEDTLS_HAVE_ASM |
maygup01 | 0:11cc2b7889af | 45 | #endif //MBEDTLS_HAVE_ASM |
maygup01 | 0:11cc2b7889af | 46 | #endif |
maygup01 | 0:11cc2b7889af | 47 | /* mbed TLS feature support */ |
maygup01 | 0:11cc2b7889af | 48 | #ifndef MBEDTLS_ECP_DP_SECP256R1_ENABLED |
maygup01 | 0:11cc2b7889af | 49 | #define MBEDTLS_ECP_DP_SECP256R1_ENABLED |
maygup01 | 0:11cc2b7889af | 50 | #endif //MBEDTLS_ECP_DP_SECP256R1_ENABLED |
maygup01 | 0:11cc2b7889af | 51 | |
maygup01 | 0:11cc2b7889af | 52 | #ifndef MBEDTLS_ECP_NIST_OPTIM |
maygup01 | 0:11cc2b7889af | 53 | #define MBEDTLS_ECP_NIST_OPTIM |
maygup01 | 0:11cc2b7889af | 54 | #endif //MBEDTLS_ECP_NIST_OPTIM |
maygup01 | 0:11cc2b7889af | 55 | |
maygup01 | 0:11cc2b7889af | 56 | #ifndef MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
maygup01 | 0:11cc2b7889af | 57 | #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
maygup01 | 0:11cc2b7889af | 58 | #endif //MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
maygup01 | 0:11cc2b7889af | 59 | |
maygup01 | 0:11cc2b7889af | 60 | #ifndef MBEDTLS_SSL_PROTO_TLS1_2 |
maygup01 | 0:11cc2b7889af | 61 | #define MBEDTLS_SSL_PROTO_TLS1_2 |
maygup01 | 0:11cc2b7889af | 62 | #endif //MBEDTLS_SSL_PROTO_TLS1_2 |
maygup01 | 0:11cc2b7889af | 63 | |
maygup01 | 0:11cc2b7889af | 64 | #ifndef MBEDTLS_SSL_PROTO_DTLS |
maygup01 | 0:11cc2b7889af | 65 | #define MBEDTLS_SSL_PROTO_DTLS |
maygup01 | 0:11cc2b7889af | 66 | #endif //MBEDTLS_SSL_PROTO_DTLS |
maygup01 | 0:11cc2b7889af | 67 | |
maygup01 | 0:11cc2b7889af | 68 | #ifndef MBEDTLS_SSL_DTLS_ANTI_REPLAY |
maygup01 | 0:11cc2b7889af | 69 | #define MBEDTLS_SSL_DTLS_ANTI_REPLAY |
maygup01 | 0:11cc2b7889af | 70 | #endif //MBEDTLS_SSL_DTLS_ANTI_REPLAY |
maygup01 | 0:11cc2b7889af | 71 | |
maygup01 | 0:11cc2b7889af | 72 | #ifndef MBEDTLS_SSL_DTLS_HELLO_VERIFY |
maygup01 | 0:11cc2b7889af | 73 | #define MBEDTLS_SSL_DTLS_HELLO_VERIFY |
maygup01 | 0:11cc2b7889af | 74 | #endif //MBEDTLS_SSL_DTLS_HELLO_VERIFY |
maygup01 | 0:11cc2b7889af | 75 | |
maygup01 | 0:11cc2b7889af | 76 | #ifndef MBEDTLS_SSL_EXPORT_KEYS |
maygup01 | 0:11cc2b7889af | 77 | #define MBEDTLS_SSL_EXPORT_KEYS |
maygup01 | 0:11cc2b7889af | 78 | #endif //MBEDTLS_SSL_EXPORT_KEYS |
maygup01 | 0:11cc2b7889af | 79 | |
maygup01 | 0:11cc2b7889af | 80 | /* mbed TLS modules */ |
maygup01 | 0:11cc2b7889af | 81 | #ifndef MBEDTLS_AES_C |
maygup01 | 0:11cc2b7889af | 82 | #define MBEDTLS_AES_C |
maygup01 | 0:11cc2b7889af | 83 | #endif //MBEDTLS_AES_C |
maygup01 | 0:11cc2b7889af | 84 | |
maygup01 | 0:11cc2b7889af | 85 | /* Disable some of the speed optimizations on AES code to save |
maygup01 | 0:11cc2b7889af | 86 | * ~6200 bytes of ROM. According to comments on the mbedtls PR 394, |
maygup01 | 0:11cc2b7889af | 87 | * the speed on Cortex M4 is not even reduced by this. */ |
maygup01 | 0:11cc2b7889af | 88 | #ifndef MBEDTLS_AES_FEWER_TABLES |
maygup01 | 0:11cc2b7889af | 89 | #define MBEDTLS_AES_FEWER_TABLES |
maygup01 | 0:11cc2b7889af | 90 | #endif // MBEDTLS_AES_FEWER_TABLES |
maygup01 | 0:11cc2b7889af | 91 | |
maygup01 | 0:11cc2b7889af | 92 | #ifndef MBEDTLS_ASN1_PARSE_C |
maygup01 | 0:11cc2b7889af | 93 | #define MBEDTLS_ASN1_PARSE_C |
maygup01 | 0:11cc2b7889af | 94 | #endif //MBEDTLS_ASN1_PARSE_C |
maygup01 | 0:11cc2b7889af | 95 | |
maygup01 | 0:11cc2b7889af | 96 | #ifndef MBEDTLS_ASN1_WRITE_C |
maygup01 | 0:11cc2b7889af | 97 | #define MBEDTLS_ASN1_WRITE_C |
maygup01 | 0:11cc2b7889af | 98 | #endif //MBEDTLS_ASN1_WRITE_C |
maygup01 | 0:11cc2b7889af | 99 | |
maygup01 | 0:11cc2b7889af | 100 | #ifndef MBEDTLS_BIGNUM_C |
maygup01 | 0:11cc2b7889af | 101 | #define MBEDTLS_BIGNUM_C |
maygup01 | 0:11cc2b7889af | 102 | #endif //MBEDTLS_BIGNUM_C |
maygup01 | 0:11cc2b7889af | 103 | |
maygup01 | 0:11cc2b7889af | 104 | #ifndef MBEDTLS_CIPHER_C |
maygup01 | 0:11cc2b7889af | 105 | #define MBEDTLS_CIPHER_C |
maygup01 | 0:11cc2b7889af | 106 | #endif //MBEDTLS_CIPHER_C |
maygup01 | 0:11cc2b7889af | 107 | |
maygup01 | 0:11cc2b7889af | 108 | #ifndef MBEDTLS_CTR_DRBG_C |
maygup01 | 0:11cc2b7889af | 109 | #define MBEDTLS_CTR_DRBG_C |
maygup01 | 0:11cc2b7889af | 110 | #endif //MBEDTLS_CTR_DRBG_C |
maygup01 | 0:11cc2b7889af | 111 | |
maygup01 | 0:11cc2b7889af | 112 | #ifndef MBEDTLS_ECP_C |
maygup01 | 0:11cc2b7889af | 113 | #define MBEDTLS_ECP_C |
maygup01 | 0:11cc2b7889af | 114 | #endif //MBEDTLS_ECP_C |
maygup01 | 0:11cc2b7889af | 115 | |
maygup01 | 0:11cc2b7889af | 116 | #ifndef MBEDTLS_ENTROPY_C |
maygup01 | 0:11cc2b7889af | 117 | #define MBEDTLS_ENTROPY_C |
maygup01 | 0:11cc2b7889af | 118 | #endif //MBEDTLS_ENTROPY_C |
maygup01 | 0:11cc2b7889af | 119 | |
maygup01 | 0:11cc2b7889af | 120 | #ifndef MBEDTLS_MD_C |
maygup01 | 0:11cc2b7889af | 121 | #define MBEDTLS_MD_C |
maygup01 | 0:11cc2b7889af | 122 | #endif //MBEDTLS_MD_C |
maygup01 | 0:11cc2b7889af | 123 | |
maygup01 | 0:11cc2b7889af | 124 | #ifndef MBEDTLS_OID_C |
maygup01 | 0:11cc2b7889af | 125 | #define MBEDTLS_OID_C |
maygup01 | 0:11cc2b7889af | 126 | #endif //MBEDTLS_OID_C |
maygup01 | 0:11cc2b7889af | 127 | |
maygup01 | 0:11cc2b7889af | 128 | #ifndef MBEDTLS_PK_C |
maygup01 | 0:11cc2b7889af | 129 | #define MBEDTLS_PK_C |
maygup01 | 0:11cc2b7889af | 130 | #endif //MBEDTLS_PK_C |
maygup01 | 0:11cc2b7889af | 131 | |
maygup01 | 0:11cc2b7889af | 132 | #ifndef MBEDTLS_PK_PARSE_C |
maygup01 | 0:11cc2b7889af | 133 | #define MBEDTLS_PK_PARSE_C |
maygup01 | 0:11cc2b7889af | 134 | #endif //MBEDTLS_PK_PARSE_C |
maygup01 | 0:11cc2b7889af | 135 | |
maygup01 | 0:11cc2b7889af | 136 | #ifndef MBEDTLS_SHA256_C |
maygup01 | 0:11cc2b7889af | 137 | #define MBEDTLS_SHA256_C |
maygup01 | 0:11cc2b7889af | 138 | #endif //MBEDTLS_SHA256_C |
maygup01 | 0:11cc2b7889af | 139 | |
maygup01 | 0:11cc2b7889af | 140 | // Disable the speed optimizations of SHA256, makes binary size smaller |
maygup01 | 0:11cc2b7889af | 141 | // on Cortex-M by 1800B with ARMCC5 and 1384B with GCC 6.3. |
maygup01 | 0:11cc2b7889af | 142 | #ifndef MBEDTLS_SHA256_SMALLER |
maygup01 | 0:11cc2b7889af | 143 | #define MBEDTLS_SHA256_SMALLER |
maygup01 | 0:11cc2b7889af | 144 | #endif // MBEDTLS_SHA256_SMALLER |
maygup01 | 0:11cc2b7889af | 145 | |
maygup01 | 0:11cc2b7889af | 146 | #ifndef MBEDTLS_SSL_COOKIE_C |
maygup01 | 0:11cc2b7889af | 147 | #define MBEDTLS_SSL_COOKIE_C |
maygup01 | 0:11cc2b7889af | 148 | #endif //MBEDTLS_SSL_COOKIE_C |
maygup01 | 0:11cc2b7889af | 149 | |
maygup01 | 0:11cc2b7889af | 150 | #ifndef MBEDTLS_SSL_CLI_C |
maygup01 | 0:11cc2b7889af | 151 | #define MBEDTLS_SSL_CLI_C |
maygup01 | 0:11cc2b7889af | 152 | #endif //MBEDTLS_SSL_CLI_C |
maygup01 | 0:11cc2b7889af | 153 | |
maygup01 | 0:11cc2b7889af | 154 | #ifndef MBEDTLS_SSL_TLS_C |
maygup01 | 0:11cc2b7889af | 155 | #define MBEDTLS_SSL_TLS_C |
maygup01 | 0:11cc2b7889af | 156 | #endif //MBEDTLS_SSL_TLS_C |
maygup01 | 0:11cc2b7889af | 157 | // XXX mbedclient needs these: mbedtls_x509_crt_free, mbedtls_x509_crt_init, mbedtls_x509_crt_parse |
maygup01 | 0:11cc2b7889af | 158 | #ifndef MBEDTLS_X509_USE_C |
maygup01 | 0:11cc2b7889af | 159 | #define MBEDTLS_X509_USE_C |
maygup01 | 0:11cc2b7889af | 160 | #endif //MBEDTLS_X509_USE_C |
maygup01 | 0:11cc2b7889af | 161 | |
maygup01 | 0:11cc2b7889af | 162 | #ifndef MBEDTLS_X509_CRT_PARSE_C |
maygup01 | 0:11cc2b7889af | 163 | #define MBEDTLS_X509_CRT_PARSE_C |
maygup01 | 0:11cc2b7889af | 164 | #endif //MBEDTLS_X509_CRT_PARSE_C |
maygup01 | 0:11cc2b7889af | 165 | // a bit wrong way to get mbedtls_ssl_conf_psk: |
maygup01 | 0:11cc2b7889af | 166 | #ifndef MBEDTLS_CMAC_C |
maygup01 | 0:11cc2b7889af | 167 | #define MBEDTLS_CMAC_C |
maygup01 | 0:11cc2b7889af | 168 | #endif //MBEDTLS_CMAC_C |
maygup01 | 0:11cc2b7889af | 169 | |
maygup01 | 0:11cc2b7889af | 170 | #ifndef MBEDTLS_ECDH_C |
maygup01 | 0:11cc2b7889af | 171 | #define MBEDTLS_ECDH_C |
maygup01 | 0:11cc2b7889af | 172 | #endif //MBEDTLS_ECDH_C |
maygup01 | 0:11cc2b7889af | 173 | |
maygup01 | 0:11cc2b7889af | 174 | #ifndef MBEDTLS_ECDSA_C |
maygup01 | 0:11cc2b7889af | 175 | #define MBEDTLS_ECDSA_C |
maygup01 | 0:11cc2b7889af | 176 | #endif //MBEDTLS_ECDSA_C |
maygup01 | 0:11cc2b7889af | 177 | |
maygup01 | 0:11cc2b7889af | 178 | #ifndef MBEDTLS_GCM_C |
maygup01 | 0:11cc2b7889af | 179 | #define MBEDTLS_GCM_C |
maygup01 | 0:11cc2b7889af | 180 | #endif //MBEDTLS_GCM_C |
maygup01 | 0:11cc2b7889af | 181 | |
maygup01 | 0:11cc2b7889af | 182 | #ifndef MBEDTLS_X509_CRT_PARSE_C |
maygup01 | 0:11cc2b7889af | 183 | #define MBEDTLS_X509_CRT_PARSE_C |
maygup01 | 0:11cc2b7889af | 184 | #endif //MBEDTLS_X509_CRT_PARSE_C |
maygup01 | 0:11cc2b7889af | 185 | |
maygup01 | 0:11cc2b7889af | 186 | #ifndef MBEDTLS_X509_CSR_PARSE_C |
maygup01 | 0:11cc2b7889af | 187 | #define MBEDTLS_X509_CSR_PARSE_C |
maygup01 | 0:11cc2b7889af | 188 | #endif //MBEDTLS_X509_CSR_PARSE_C |
maygup01 | 0:11cc2b7889af | 189 | |
maygup01 | 0:11cc2b7889af | 190 | #ifndef MBEDTLS_X509_CREATE_C |
maygup01 | 0:11cc2b7889af | 191 | #define MBEDTLS_X509_CREATE_C |
maygup01 | 0:11cc2b7889af | 192 | #endif //MBEDTLS_X509_CREATE_C |
maygup01 | 0:11cc2b7889af | 193 | |
maygup01 | 0:11cc2b7889af | 194 | #ifndef MBEDTLS_X509_CSR_WRITE_C |
maygup01 | 0:11cc2b7889af | 195 | #define MBEDTLS_X509_CSR_WRITE_C |
maygup01 | 0:11cc2b7889af | 196 | #endif //MBEDTLS_X509_CSR_WRITE_C |
maygup01 | 0:11cc2b7889af | 197 | |
maygup01 | 0:11cc2b7889af | 198 | #ifndef MBEDTLS_CTR_DRBG_MAX_REQUEST |
maygup01 | 0:11cc2b7889af | 199 | #define MBEDTLS_CTR_DRBG_MAX_REQUEST 2048 |
maygup01 | 0:11cc2b7889af | 200 | #endif //MBEDTLS_CTR_DRBG_MAX_REQUEST |
maygup01 | 0:11cc2b7889af | 201 | |
maygup01 | 0:11cc2b7889af | 202 | // Needed by update |
maygup01 | 0:11cc2b7889af | 203 | #ifndef MBEDTLS_CIPHER_MODE_CTR |
maygup01 | 0:11cc2b7889af | 204 | #define MBEDTLS_CIPHER_MODE_CTR |
maygup01 | 0:11cc2b7889af | 205 | #endif //MBEDTLS_CIPHER_MODE_CTR |
maygup01 | 0:11cc2b7889af | 206 | |
maygup01 | 0:11cc2b7889af | 207 | // Save ROM and a few bytes of RAM by specifying our own ciphersuite list |
maygup01 | 0:11cc2b7889af | 208 | #ifndef MBEDTLS_SSL_CIPHERSUITES |
maygup01 | 0:11cc2b7889af | 209 | #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, \ |
maygup01 | 0:11cc2b7889af | 210 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, \ |
maygup01 | 0:11cc2b7889af | 211 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \ |
maygup01 | 0:11cc2b7889af | 212 | MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, \ |
maygup01 | 0:11cc2b7889af | 213 | MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8 |
maygup01 | 0:11cc2b7889af | 214 | #endif //MBEDTLS_SSL_CIPHERSUITES |
maygup01 | 0:11cc2b7889af | 215 | |
maygup01 | 0:11cc2b7889af | 216 | /*! All of the following definitions are optimizations (reduce mbedTLS memory usage and size), |
maygup01 | 0:11cc2b7889af | 217 | * changing them is on the user responsibility since they can enlarge |
maygup01 | 0:11cc2b7889af | 218 | * the binary footprint and the memory usage |
maygup01 | 0:11cc2b7889af | 219 | */ |
maygup01 | 0:11cc2b7889af | 220 | |
maygup01 | 0:11cc2b7889af | 221 | // define to save 8KB RAM at the expense of ROM |
maygup01 | 0:11cc2b7889af | 222 | #ifndef MBEDTLS_AES_ROM_TABLES |
maygup01 | 0:11cc2b7889af | 223 | #define MBEDTLS_AES_ROM_TABLES |
maygup01 | 0:11cc2b7889af | 224 | #endif //MBEDTLS_AES_ROM_TABLES |
maygup01 | 0:11cc2b7889af | 225 | |
maygup01 | 0:11cc2b7889af | 226 | // Reduce IO buffer to save RAM, default is 16KB |
maygup01 | 0:11cc2b7889af | 227 | #ifndef MBEDTLS_SSL_MAX_CONTENT_LEN |
maygup01 | 0:11cc2b7889af | 228 | #define MBEDTLS_SSL_MAX_CONTENT_LEN 4096 |
maygup01 | 0:11cc2b7889af | 229 | #endif //MBEDTLS_SSL_MAX_CONTENT_LEN |
maygup01 | 0:11cc2b7889af | 230 | |
maygup01 | 0:11cc2b7889af | 231 | // needed for Base64 encoding Opaque data for |
maygup01 | 0:11cc2b7889af | 232 | // registration payload, adds 500 bytes to flash. |
maygup01 | 0:11cc2b7889af | 233 | #ifndef MBEDTLS_BASE64_C |
maygup01 | 0:11cc2b7889af | 234 | #define MBEDTLS_BASE64_C |
maygup01 | 0:11cc2b7889af | 235 | #endif // MBEDTLS_BASE64_C |
maygup01 | 0:11cc2b7889af | 236 | |
maygup01 | 0:11cc2b7889af | 237 | /** |
maygup01 | 0:11cc2b7889af | 238 | * \def MBEDTLS_SSL_RENEGOTIATION |
maygup01 | 0:11cc2b7889af | 239 | * |
maygup01 | 0:11cc2b7889af | 240 | * Enable support for TLS renegotiation. |
maygup01 | 0:11cc2b7889af | 241 | * |
maygup01 | 0:11cc2b7889af | 242 | * The two main uses of renegotiation are (1) refresh keys on long-lived |
maygup01 | 0:11cc2b7889af | 243 | * connections and (2) client authentication after the initial handshake. |
maygup01 | 0:11cc2b7889af | 244 | * If you don't need renegotiation, it's probably better to disable it, since |
maygup01 | 0:11cc2b7889af | 245 | * it has been associated with security issues in the past and is easy to |
maygup01 | 0:11cc2b7889af | 246 | * misuse/misunderstand. |
maygup01 | 0:11cc2b7889af | 247 | * |
maygup01 | 0:11cc2b7889af | 248 | * Comment this to disable support for renegotiation. |
maygup01 | 0:11cc2b7889af | 249 | * |
maygup01 | 0:11cc2b7889af | 250 | * \note Even if this option is disabled, both client and server are aware |
maygup01 | 0:11cc2b7889af | 251 | * of the Renegotiation Indication Extension (RFC 5746) used to |
maygup01 | 0:11cc2b7889af | 252 | * prevent the SSL renegotiation attack (see RFC 5746 Sect. 1). |
maygup01 | 0:11cc2b7889af | 253 | * (See \c mbedtls_ssl_conf_legacy_renegotiation for the |
maygup01 | 0:11cc2b7889af | 254 | * configuration of this extension). |
maygup01 | 0:11cc2b7889af | 255 | * |
maygup01 | 0:11cc2b7889af | 256 | * \note This feature is required by Device Management Client for Client-side |
maygup01 | 0:11cc2b7889af | 257 | * certificate expiration verification. Disabling it will also require |
maygup01 | 0:11cc2b7889af | 258 | * setting PAL_USE_SECURE_TIME to 0. |
maygup01 | 0:11cc2b7889af | 259 | * |
maygup01 | 0:11cc2b7889af | 260 | */ |
maygup01 | 0:11cc2b7889af | 261 | #define MBEDTLS_SSL_RENEGOTIATION |
maygup01 | 0:11cc2b7889af | 262 | |
maygup01 | 0:11cc2b7889af | 263 | // Needed by provisioning |
maygup01 | 0:11cc2b7889af | 264 | #undef MBEDTLS_PEM_WRITE_C |
maygup01 | 0:11cc2b7889af | 265 | |
maygup01 | 0:11cc2b7889af | 266 | // Remove RSA, save 20KB at total |
maygup01 | 0:11cc2b7889af | 267 | #if !MBED_CONF_MBED_CLIENT_PAL_RSA_REQUIRED |
maygup01 | 0:11cc2b7889af | 268 | #undef MBEDTLS_RSA_C |
maygup01 | 0:11cc2b7889af | 269 | #undef MBEDTLS_PK_RSA_ALT_SUPPORT |
maygup01 | 0:11cc2b7889af | 270 | #undef MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
maygup01 | 0:11cc2b7889af | 271 | #undef MBEDTLS_KEY_EXCHANGE_RSA_ENABLED |
maygup01 | 0:11cc2b7889af | 272 | #undef MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED |
maygup01 | 0:11cc2b7889af | 273 | #endif // MBED_CONF_MBED_CLIENT_PAL_RSA_REQUIRED |
maygup01 | 0:11cc2b7889af | 274 | |
maygup01 | 0:11cc2b7889af | 275 | // Remove error messages, save 10KB of ROM |
maygup01 | 0:11cc2b7889af | 276 | #undef MBEDTLS_ERROR_C |
maygup01 | 0:11cc2b7889af | 277 | |
maygup01 | 0:11cc2b7889af | 278 | // Remove selftesting and save 11KB of ROM |
maygup01 | 0:11cc2b7889af | 279 | #undef MBEDTLS_SELF_TEST |
maygup01 | 0:11cc2b7889af | 280 | |
maygup01 | 0:11cc2b7889af | 281 | #undef MBEDTLS_CERTS_C |
maygup01 | 0:11cc2b7889af | 282 | |
maygup01 | 0:11cc2b7889af | 283 | // Reduces ROM size by 30 kB |
maygup01 | 0:11cc2b7889af | 284 | #undef MBEDTLS_ERROR_STRERROR_DUMMY |
maygup01 | 0:11cc2b7889af | 285 | |
maygup01 | 0:11cc2b7889af | 286 | #undef MBEDTLS_VERSION_FEATURES |
maygup01 | 0:11cc2b7889af | 287 | |
maygup01 | 0:11cc2b7889af | 288 | #undef MBEDTLS_DEBUG_C |
maygup01 | 0:11cc2b7889af | 289 | |
maygup01 | 0:11cc2b7889af | 290 | // needed for parsing the certificates |
maygup01 | 0:11cc2b7889af | 291 | #undef MBEDTLS_PEM_PARSE_C |
maygup01 | 0:11cc2b7889af | 292 | |
maygup01 | 0:11cc2b7889af | 293 | #undef MBEDTLS_SHA512_C |
maygup01 | 0:11cc2b7889af | 294 | |
maygup01 | 0:11cc2b7889af | 295 | #undef MBEDTLS_SSL_SRV_C |
maygup01 | 0:11cc2b7889af | 296 | |
maygup01 | 0:11cc2b7889af | 297 | #undef MBEDTLS_ECP_DP_SECP192R1_ENABLED |
maygup01 | 0:11cc2b7889af | 298 | #undef MBEDTLS_ECP_DP_SECP224R1_ENABLED |
maygup01 | 0:11cc2b7889af | 299 | #undef MBEDTLS_ECP_DP_SECP384R1_ENABLED |
maygup01 | 0:11cc2b7889af | 300 | #undef MBEDTLS_ECP_DP_SECP521R1_ENABLED |
maygup01 | 0:11cc2b7889af | 301 | #undef MBEDTLS_ECP_DP_SECP192K1_ENABLED |
maygup01 | 0:11cc2b7889af | 302 | #undef MBEDTLS_ECP_DP_SECP224K1_ENABLED |
maygup01 | 0:11cc2b7889af | 303 | #undef MBEDTLS_ECP_DP_SECP256K1_ENABLED |
maygup01 | 0:11cc2b7889af | 304 | #undef MBEDTLS_ECP_DP_BP256R1_ENABLED |
maygup01 | 0:11cc2b7889af | 305 | #undef MBEDTLS_ECP_DP_BP384R1_ENABLED |
maygup01 | 0:11cc2b7889af | 306 | #undef MBEDTLS_ECP_DP_BP512R1_ENABLED |
maygup01 | 0:11cc2b7889af | 307 | #undef MBEDTLS_ECP_DP_CURVE25519_ENABLED |
maygup01 | 0:11cc2b7889af | 308 | |
maygup01 | 0:11cc2b7889af | 309 | // Reduces size particularly in case PSA crypto is used |
maygup01 | 0:11cc2b7889af | 310 | #undef MBEDTLS_CHACHA20_C |
maygup01 | 0:11cc2b7889af | 311 | #undef MBEDTLS_CHACHAPOLY_C |
maygup01 | 0:11cc2b7889af | 312 | #undef MBEDTLS_POLY1305_C |
maygup01 | 0:11cc2b7889af | 313 | |
maygup01 | 0:11cc2b7889af | 314 | #include "mbedtls/check_config.h" |
maygup01 | 0:11cc2b7889af | 315 | |
maygup01 | 0:11cc2b7889af | 316 | #endif /* PAL_MBEDTLS_USER_CONFIG_H */ |