|
1 |
| -/* |
| 1 | +/** |
2 | 2 | * Minimal configuration for using mbedtls as part of mbed-client
|
3 | 3 | *
|
| 4 | + * NOTE! This is an optimized, minimal configuration for mbed Client. |
| 5 | + * We know it works with mbed Client but if you want to add more |
| 6 | + * services/communications to the application yourself - please ensure |
| 7 | + * you update this configuration accordingly. The default configuration |
| 8 | + * can be found from mbedTLS Github: |
| 9 | + * |
| 10 | + * https://github.com/ARMmbed/mbedtls/blob/development/include/mbedtls/config.h |
| 11 | + * |
| 12 | + * |
4 | 13 | * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
|
5 | 14 | * SPDX-License-Identifier: Apache-2.0
|
6 | 15 | *
|
|
41 | 50 | #define MBEDTLS_ASN1_PARSE_C
|
42 | 51 | #define MBEDTLS_ASN1_WRITE_C
|
43 | 52 | #define MBEDTLS_BIGNUM_C
|
44 |
| -#define MBEDTLS_CCM_C |
45 | 53 | #define MBEDTLS_CIPHER_C
|
46 | 54 | #define MBEDTLS_CTR_DRBG_C
|
47 | 55 | #define MBEDTLS_ECP_C
|
|
59 | 67 | // XXX mbedclient needs these: mbedtls_x509_crt_free, mbedtls_x509_crt_init, mbedtls_x509_crt_parse
|
60 | 68 | #define MBEDTLS_X509_USE_C
|
61 | 69 | #define MBEDTLS_X509_CRT_PARSE_C
|
62 |
| -// a bit wrong way to get mbedtls_ssl_conf_psk: |
63 |
| -// XXX: this should be ifdef'd out from client too |
64 |
| -#define MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED |
65 | 70 |
|
66 | 71 | // XXX: clean these up!!
|
67 |
| -#define MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED |
68 |
| -#define MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED |
69 |
| -#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
70 | 72 | #define MBEDTLS_SHA512_C
|
71 | 73 | #define MBEDTLS_ECDH_C
|
72 | 74 | #define MBEDTLS_GCM_C
|
73 |
| -#define MBEDTLS_CCM_C |
74 | 75 |
|
75 |
| -#define MBEDTLS_PKCS1_V15 |
76 |
| - |
77 |
| -#define MBEDTLS_CIPHER_MODE_CBC |
78 | 76 | #define MBEDTLS_ECDH_C
|
79 | 77 | #define MBEDTLS_ECDSA_C
|
80 | 78 | #define MBEDTLS_X509_CRT_PARSE_C
|
|
89 | 87 | // Remove selftesting and save 11KB of ROM
|
90 | 88 | #undef MBEDTLS_SELF_TEST
|
91 | 89 |
|
92 |
| -#undef MBEDTLS_SSL_COOKIE_C |
93 |
| - |
94 | 90 | // Reduces ROM size by 30 kB
|
95 | 91 | #undef MBEDTLS_ERROR_STRERROR_DUMMY
|
96 | 92 | #undef MBEDTLS_VERSION_FEATURES
|
|
101 | 97 | // dep of the previous
|
102 | 98 | #define MBEDTLS_BASE64_C
|
103 | 99 |
|
104 |
| -// reduce IO buffer to save RAM, default is 16KB |
| 100 | +// Reduce IO buffer to save RAM, default is 16KB |
105 | 101 | #define MBEDTLS_SSL_MAX_CONTENT_LEN 2048
|
106 | 102 |
|
107 | 103 | // define to save 8KB RAM at the expense of ROM
|
|
0 commit comments