2 * Copyright (c) 2019, The OpenThread Authors.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. Neither the name of the copyright holder nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
29 #ifndef OTBR_MBEDTLS_CONFIG_H_
30 #define OTBR_MBEDTLS_CONFIG_H_
32 #define MBEDTLS_DEBUG_C
34 // Not supported on MIPS
36 #define MBEDTLS_HAVE_ASM
39 #define MBEDTLS_AES_ROM_TABLES
40 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
41 #define MBEDTLS_ECP_NIST_OPTIM
42 #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
43 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
44 #define MBEDTLS_SSL_PROTO_TLS1_2
45 #define MBEDTLS_SSL_PROTO_DTLS
46 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
47 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
48 #define MBEDTLS_SSL_EXPORT_KEYS
51 #define MBEDTLS_ASN1_PARSE_C
52 #define MBEDTLS_ASN1_WRITE_C
53 #define MBEDTLS_BIGNUM_C
55 #define MBEDTLS_CIPHER_C
56 #define MBEDTLS_CTR_DRBG_C
57 #define MBEDTLS_CMAC_C
58 #define MBEDTLS_ECJPAKE_C
60 #define MBEDTLS_ENTROPY_C
61 #define MBEDTLS_HMAC_DRBG_C
65 #define MBEDTLS_PK_PARSE_C
66 #define MBEDTLS_SHA256_C
67 #define MBEDTLS_SHA256_SMALLER
68 #define MBEDTLS_SSL_COOKIE_C
69 #define MBEDTLS_SSL_CLI_C
70 #define MBEDTLS_SSL_SRV_C
71 #define MBEDTLS_SSL_TLS_C
73 // Enable ECDSA support
74 #define MBEDTLS_BASE64_C
75 #define MBEDTLS_ECDH_C
76 #define MBEDTLS_ECDSA_C
77 #define MBEDTLS_ECDSA_DETERMINISTIC
79 #define MBEDTLS_PEM_PARSE_C
80 #define MBEDTLS_PK_WRITE_C
83 #define MBEDTLS_TIMING_C
85 #define MBEDTLS_AES_ROM_TABLES
87 #define MBEDTLS_ECP_MAX_BITS 256
88 #define MBEDTLS_MPI_MAX_SIZE 32
89 #define MBEDTLS_SSL_MAX_CONTENT_LEN 900
91 #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
93 #include "mbedtls/check_config.h"
95 #endif // OTBR_MBEDTLS_CONFIG_H_