FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:35:07 2017 +0000
Revision:
0:a2cb7295a1f7
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ram54288 0:a2cb7295a1f7 1 /**
ram54288 0:a2cb7295a1f7 2 * Minimal configuration for using mbedtls as part of mbed-client
ram54288 0:a2cb7295a1f7 3 *
ram54288 0:a2cb7295a1f7 4 * NOTE! This is an optimized, minimal configuration for mbed Client.
ram54288 0:a2cb7295a1f7 5 * We know it works with mbed Client but if you want to add more
ram54288 0:a2cb7295a1f7 6 * services/communications to the application yourself - please ensure
ram54288 0:a2cb7295a1f7 7 * you update this configuration accordingly. The default configuration
ram54288 0:a2cb7295a1f7 8 * can be found from mbedTLS Github:
ram54288 0:a2cb7295a1f7 9 *
ram54288 0:a2cb7295a1f7 10 * https://github.com/ARMmbed/mbedtls/blob/development/include/mbedtls/config.h
ram54288 0:a2cb7295a1f7 11 *
ram54288 0:a2cb7295a1f7 12 *
ram54288 0:a2cb7295a1f7 13 * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
ram54288 0:a2cb7295a1f7 14 * SPDX-License-Identifier: Apache-2.0
ram54288 0:a2cb7295a1f7 15 *
ram54288 0:a2cb7295a1f7 16 * Licensed under the Apache License, Version 2.0 (the "License"); you may
ram54288 0:a2cb7295a1f7 17 * not use this file except in compliance with the License.
ram54288 0:a2cb7295a1f7 18 * You may obtain a copy of the License at
ram54288 0:a2cb7295a1f7 19 *
ram54288 0:a2cb7295a1f7 20 * http://www.apache.org/licenses/LICENSE-2.0
ram54288 0:a2cb7295a1f7 21 *
ram54288 0:a2cb7295a1f7 22 * Unless required by applicable law or agreed to in writing, software
ram54288 0:a2cb7295a1f7 23 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
ram54288 0:a2cb7295a1f7 24 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ram54288 0:a2cb7295a1f7 25 * See the License for the specific language governing permissions and
ram54288 0:a2cb7295a1f7 26 * limitations under the License.
ram54288 0:a2cb7295a1f7 27 *
ram54288 0:a2cb7295a1f7 28 * This file is part of mbed TLS (https://tls.mbed.org)
ram54288 0:a2cb7295a1f7 29 */
ram54288 0:a2cb7295a1f7 30
ram54288 0:a2cb7295a1f7 31
ram54288 0:a2cb7295a1f7 32 #ifndef MBEDTLS_CUSTOM_CONFIG_H
ram54288 0:a2cb7295a1f7 33 #define MBEDTLS_CUSTOM_CONFIG_H
ram54288 0:a2cb7295a1f7 34
ram54288 0:a2cb7295a1f7 35 /* System support */
ram54288 0:a2cb7295a1f7 36 #define MBEDTLS_HAVE_ASM
ram54288 0:a2cb7295a1f7 37
ram54288 0:a2cb7295a1f7 38 /* mbed TLS feature support */
ram54288 0:a2cb7295a1f7 39 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
ram54288 0:a2cb7295a1f7 40 #define MBEDTLS_ECP_NIST_OPTIM
ram54288 0:a2cb7295a1f7 41 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
ram54288 0:a2cb7295a1f7 42 #define MBEDTLS_SSL_PROTO_TLS1_2
ram54288 0:a2cb7295a1f7 43 #define MBEDTLS_SSL_PROTO_DTLS
ram54288 0:a2cb7295a1f7 44 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
ram54288 0:a2cb7295a1f7 45 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
ram54288 0:a2cb7295a1f7 46 #define MBEDTLS_SSL_EXPORT_KEYS
ram54288 0:a2cb7295a1f7 47
ram54288 0:a2cb7295a1f7 48 /* mbed TLS modules */
ram54288 0:a2cb7295a1f7 49 #define MBEDTLS_AES_C
ram54288 0:a2cb7295a1f7 50 #define MBEDTLS_ASN1_PARSE_C
ram54288 0:a2cb7295a1f7 51 #define MBEDTLS_ASN1_WRITE_C
ram54288 0:a2cb7295a1f7 52 #define MBEDTLS_BIGNUM_C
ram54288 0:a2cb7295a1f7 53 #define MBEDTLS_CIPHER_C
ram54288 0:a2cb7295a1f7 54 #define MBEDTLS_CTR_DRBG_C
ram54288 0:a2cb7295a1f7 55 #define MBEDTLS_ECP_C
ram54288 0:a2cb7295a1f7 56 #define MBEDTLS_ENTROPY_C
ram54288 0:a2cb7295a1f7 57 #define MBEDTLS_MD_C
ram54288 0:a2cb7295a1f7 58 #define MBEDTLS_OID_C
ram54288 0:a2cb7295a1f7 59 #define MBEDTLS_PK_C
ram54288 0:a2cb7295a1f7 60 #define MBEDTLS_PK_PARSE_C
ram54288 0:a2cb7295a1f7 61 #define MBEDTLS_SHA256_C
ram54288 0:a2cb7295a1f7 62 #define MBEDTLS_SSL_COOKIE_C
ram54288 0:a2cb7295a1f7 63 #define MBEDTLS_SSL_CLI_C
ram54288 0:a2cb7295a1f7 64 #define MBEDTLS_SSL_SRV_C
ram54288 0:a2cb7295a1f7 65 #define MBEDTLS_SSL_TLS_C
ram54288 0:a2cb7295a1f7 66
ram54288 0:a2cb7295a1f7 67 // XXX mbedclient needs these: mbedtls_x509_crt_free, mbedtls_x509_crt_init, mbedtls_x509_crt_parse
ram54288 0:a2cb7295a1f7 68 #define MBEDTLS_X509_USE_C
ram54288 0:a2cb7295a1f7 69 #define MBEDTLS_X509_CRT_PARSE_C
ram54288 0:a2cb7295a1f7 70
ram54288 0:a2cb7295a1f7 71 // XXX: clean these up!!
ram54288 0:a2cb7295a1f7 72 #define MBEDTLS_SHA512_C
ram54288 0:a2cb7295a1f7 73 #define MBEDTLS_ECDH_C
ram54288 0:a2cb7295a1f7 74 #define MBEDTLS_GCM_C
ram54288 0:a2cb7295a1f7 75
ram54288 0:a2cb7295a1f7 76 #define MBEDTLS_ECDH_C
ram54288 0:a2cb7295a1f7 77 #define MBEDTLS_ECDSA_C
ram54288 0:a2cb7295a1f7 78 #define MBEDTLS_X509_CRT_PARSE_C
ram54288 0:a2cb7295a1f7 79
ram54288 0:a2cb7295a1f7 80 // Remove RSA, save 20KB at total
ram54288 0:a2cb7295a1f7 81 #undef MBEDTLS_RSA_C
ram54288 0:a2cb7295a1f7 82 #undef MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
ram54288 0:a2cb7295a1f7 83
ram54288 0:a2cb7295a1f7 84 // Remove error messages, save 10KB of ROM
ram54288 0:a2cb7295a1f7 85 #undef MBEDTLS_ERROR_C
ram54288 0:a2cb7295a1f7 86
ram54288 0:a2cb7295a1f7 87 // Remove selftesting and save 11KB of ROM
ram54288 0:a2cb7295a1f7 88 #undef MBEDTLS_SELF_TEST
ram54288 0:a2cb7295a1f7 89
ram54288 0:a2cb7295a1f7 90 // Reduces ROM size by 30 kB
ram54288 0:a2cb7295a1f7 91 #undef MBEDTLS_ERROR_STRERROR_DUMMY
ram54288 0:a2cb7295a1f7 92 #undef MBEDTLS_VERSION_FEATURES
ram54288 0:a2cb7295a1f7 93 #undef MBEDTLS_DEBUG_C
ram54288 0:a2cb7295a1f7 94
ram54288 0:a2cb7295a1f7 95 // needed for parsing the certificates
ram54288 0:a2cb7295a1f7 96 #define MBEDTLS_PEM_PARSE_C
ram54288 0:a2cb7295a1f7 97 // dep of the previous
ram54288 0:a2cb7295a1f7 98 #define MBEDTLS_BASE64_C
ram54288 0:a2cb7295a1f7 99
ram54288 0:a2cb7295a1f7 100 // Reduce IO buffer to save RAM, default is 16KB
ram54288 0:a2cb7295a1f7 101 #define MBEDTLS_SSL_MAX_CONTENT_LEN 2048
ram54288 0:a2cb7295a1f7 102
ram54288 0:a2cb7295a1f7 103 // define to save 8KB RAM at the expense of ROM
ram54288 0:a2cb7295a1f7 104 #undef MBEDTLS_AES_ROM_TABLES
ram54288 0:a2cb7295a1f7 105
ram54288 0:a2cb7295a1f7 106 // Save ROM and a few bytes of RAM by specifying our own ciphersuite list
ram54288 0:a2cb7295a1f7 107 #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
ram54288 0:a2cb7295a1f7 108
ram54288 0:a2cb7295a1f7 109 #include "mbedtls/check_config.h"
ram54288 0:a2cb7295a1f7 110
ram54288 0:a2cb7295a1f7 111 #endif /* MBEDTLS_CUSTOM_CONFIG_H */