|
19 | 19 | #ifndef MBEDTLS_CONFIG_H
|
20 | 20 | #define MBEDTLS_CONFIG_H
|
21 | 21 |
|
22 |
| -#include "openthread-core-config.h" |
23 |
| - |
24 | 22 | #include <stdio.h>
|
25 | 23 | #include <stdlib.h>
|
26 | 24 |
|
27 |
| -#include <openthread/config.h> |
28 |
| -#include <openthread/platform/logging.h> |
29 |
| -#include <openthread/platform/memory.h> |
30 |
| - |
31 | 25 | #undef MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
|
32 | 26 | #define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf
|
33 | 27 |
|
|
67 | 61 | #define MBEDTLS_SSL_PROTO_DTLS
|
68 | 62 | #define MBEDTLS_SSL_TLS_C
|
69 | 63 |
|
70 |
| -#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE || OPENTHREAD_CONFIG_COMMISSIONER_ENABLE || OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE |
71 |
| -#define MBEDTLS_SSL_COOKIE_C |
72 |
| -#define MBEDTLS_SSL_SRV_C |
73 |
| -#endif |
74 |
| - |
75 |
| -#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE |
76 |
| -#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED |
77 |
| -#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
78 |
| -#endif |
79 |
| - |
80 | 64 | #ifdef MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
81 | 65 | #define MBEDTLS_BASE64_C
|
82 | 66 | #define MBEDTLS_ECDH_C
|
|
87 | 71 | #define MBEDTLS_X509_CRT_PARSE_C
|
88 | 72 | #endif
|
89 | 73 |
|
90 |
| -#if OPENTHREAD_CONFIG_ECDSA_ENABLE |
91 |
| -#define MBEDTLS_BASE64_C |
92 |
| -#define MBEDTLS_ECDH_C |
93 |
| -#define MBEDTLS_ECDSA_C |
94 |
| -#define MBEDTLS_ECDSA_DETERMINISTIC |
95 |
| -#define MBEDTLS_OID_C |
96 |
| -#define MBEDTLS_PEM_PARSE_C |
97 |
| -#define MBEDTLS_PK_WRITE_C |
98 |
| -#endif |
99 | 74 |
|
100 | 75 | #define MBEDTLS_MPI_WINDOW_SIZE 1 /**< Maximum windows size used. */
|
101 | 76 | #define MBEDTLS_MPI_MAX_SIZE 32 /**< Maximum number of bytes for usable MPIs. */
|
|
104 | 79 | #define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 /**< Enable fixed-point speed-up */
|
105 | 80 | #define MBEDTLS_ENTROPY_MAX_SOURCES 2 /**< Maximum number of sources supported */
|
106 | 81 |
|
107 |
| -#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE |
108 |
| -#define MBEDTLS_PLATFORM_STD_CALLOC otPlatCAlloc /**< Default allocator to use, can be undefined */ |
109 |
| -#define MBEDTLS_PLATFORM_STD_FREE otPlatFree /**< Default free to use, can be undefined */ |
110 |
| -#else |
111 | 82 | #define MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
112 |
| -#endif |
113 | 83 |
|
114 |
| -#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE |
115 |
| -#define MBEDTLS_SSL_MAX_CONTENT_LEN 900 /**< Maxium fragment length in bytes */ |
116 |
| -#else |
117 | 84 | #define MBEDTLS_SSL_MAX_CONTENT_LEN 768 /**< Maxium fragment length in bytes */
|
118 |
| -#endif |
119 |
| - |
120 | 85 | #define MBEDTLS_SSL_IN_CONTENT_LEN MBEDTLS_SSL_MAX_CONTENT_LEN
|
121 | 86 | #define MBEDTLS_SSL_OUT_CONTENT_LEN MBEDTLS_SSL_MAX_CONTENT_LEN
|
122 | 87 | #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
|
|
0 commit comments