Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 1 | #!/bin/sh |
Bence Szépkúti | b7246ad | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 2 | # |
| 3 | # Copyright (C) 2015-2016, Arm Limited, All Rights Reserved |
Bence Szépkúti | 09b4f19 | 2020-05-26 01:54:15 +0200 | [diff] [blame^] | 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 7 | # not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Bence Szépkúti | b7246ad | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 17 | # |
| 18 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 19 | |
| 20 | set -eu |
| 21 | |
| 22 | if [ $# -ne 2 ]; then |
| 23 | echo "Usage: $0 path/to/config.pl path/to/config.h" >&2 |
| 24 | exit 1 |
| 25 | fi |
| 26 | |
| 27 | SCRIPT=$1 |
| 28 | FILE=$2 |
| 29 | |
| 30 | conf() { |
| 31 | $SCRIPT -f $FILE $@ |
| 32 | } |
| 33 | |
Simon Butcher | b2c81b1 | 2016-06-23 13:56:06 +0100 | [diff] [blame] | 34 | |
| 35 | # Set the target specific header |
Simon Butcher | 1d46a2d | 2016-07-11 10:17:03 +0100 | [diff] [blame] | 36 | conf set YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE \"mbedtls/target_config.h\" |
Simon Butcher | b2c81b1 | 2016-06-23 13:56:06 +0100 | [diff] [blame] | 37 | |
Manuel Pégourié-Gonnard | 0adc7f7 | 2015-07-31 17:50:00 +0200 | [diff] [blame] | 38 | # not supported on mbed OS, nor used by mbed Client |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 39 | conf unset MBEDTLS_NET_C |
| 40 | conf unset MBEDTLS_TIMING_C |
| 41 | |
Manuel Pégourié-Gonnard | 0adc7f7 | 2015-07-31 17:50:00 +0200 | [diff] [blame] | 42 | # not supported on all targets with mbed OS, nor used by mbed Client |
| 43 | conf unset MBEDTLS_FS_IO |
| 44 | |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 45 | conf unset MBEDTLS_CIPHER_MODE_CFB |
| 46 | conf unset MBEDTLS_CIPHER_MODE_CTR |
| 47 | conf unset MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS |
| 48 | conf unset MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN |
| 49 | conf unset MBEDTLS_CIPHER_PADDING_ZEROS |
| 50 | conf unset MBEDTLS_ECP_DP_SECP192R1_ENABLED |
| 51 | conf unset MBEDTLS_ECP_DP_SECP224R1_ENABLED |
| 52 | conf unset MBEDTLS_ECP_DP_SECP521R1_ENABLED |
| 53 | conf unset MBEDTLS_ECP_DP_SECP192K1_ENABLED |
| 54 | conf unset MBEDTLS_ECP_DP_SECP224K1_ENABLED |
| 55 | conf unset MBEDTLS_ECP_DP_SECP256K1_ENABLED |
| 56 | conf unset MBEDTLS_ECP_DP_BP256R1_ENABLED |
| 57 | conf unset MBEDTLS_ECP_DP_BP384R1_ENABLED |
| 58 | conf unset MBEDTLS_ECP_DP_BP512R1_ENABLED |
| 59 | conf unset MBEDTLS_PK_PARSE_EC_EXTENDED |
| 60 | |
| 61 | conf unset MBEDTLS_AESNI_C |
| 62 | conf unset MBEDTLS_ARC4_C |
| 63 | conf unset MBEDTLS_BLOWFISH_C |
| 64 | conf unset MBEDTLS_CAMELLIA_C |
| 65 | conf unset MBEDTLS_DES_C |
| 66 | conf unset MBEDTLS_DHM_C |
| 67 | conf unset MBEDTLS_GENPRIME |
| 68 | conf unset MBEDTLS_MD5_C |
| 69 | conf unset MBEDTLS_PADLOCK_C |
| 70 | conf unset MBEDTLS_PEM_WRITE_C |
| 71 | conf unset MBEDTLS_PKCS5_C |
| 72 | conf unset MBEDTLS_PKCS12_C |
| 73 | conf unset MBEDTLS_RIPEMD160_C |
Manuel Pégourié-Gonnard | c5e0372 | 2015-07-28 17:09:42 +0200 | [diff] [blame] | 74 | conf unset MBEDTLS_SHA1_C |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 75 | conf unset MBEDTLS_XTEA_C |
| 76 | |
| 77 | conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 78 | |
| 79 | conf unset MBEDTLS_X509_CSR_PARSE_C |
| 80 | conf unset MBEDTLS_X509_CREATE_C |
| 81 | conf unset MBEDTLS_X509_CRT_WRITE_C |
| 82 | conf unset MBEDTLS_X509_CSR_WRITE_C |
| 83 | |
| 84 | conf unset MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED |
| 85 | conf unset MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED |
| 86 | conf unset MBEDTLS_KEY_EXCHANGE_RSA_ENABLED |
| 87 | conf unset MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED |
| 88 | conf unset MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED |
| 89 | conf unset MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED |
| 90 | conf unset MBEDTLS_SSL_FALLBACK_SCSV |
| 91 | conf unset MBEDTLS_SSL_CBC_RECORD_SPLITTING |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 92 | conf unset MBEDTLS_SSL_PROTO_TLS1 |
| 93 | conf unset MBEDTLS_SSL_PROTO_TLS1_1 |
| 94 | conf unset MBEDTLS_SSL_TRUNCATED_HMAC |