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 | # |
Bence Szépkúti | 44bfbe3 | 2020-08-19 16:54:51 +0200 | [diff] [blame] | 3 | # Copyright The Mbed TLS Contributors |
Bence Szépkúti | 4e9f712 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 5 | # |
| 6 | # This file is provided under the Apache License 2.0, or the |
| 7 | # GNU General Public License v2.0 or later. |
| 8 | # |
| 9 | # ********** |
| 10 | # Apache License 2.0: |
Bence Szépkúti | 09b4f19 | 2020-05-26 01:54:15 +0200 | [diff] [blame] | 11 | # |
| 12 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 13 | # not use this file except in compliance with the License. |
| 14 | # You may obtain a copy of the License at |
| 15 | # |
| 16 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 17 | # |
| 18 | # Unless required by applicable law or agreed to in writing, software |
| 19 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 20 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 21 | # See the License for the specific language governing permissions and |
| 22 | # limitations under the License. |
Bence Szépkúti | b7246ad | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 23 | # |
Bence Szépkúti | 4e9f712 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 24 | # ********** |
| 25 | # |
| 26 | # ********** |
| 27 | # GNU General Public License v2.0 or later: |
| 28 | # |
| 29 | # This program is free software; you can redistribute it and/or modify |
| 30 | # it under the terms of the GNU General Public License as published by |
| 31 | # the Free Software Foundation; either version 2 of the License, or |
| 32 | # (at your option) any later version. |
| 33 | # |
| 34 | # This program is distributed in the hope that it will be useful, |
| 35 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 36 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 37 | # GNU General Public License for more details. |
| 38 | # |
| 39 | # You should have received a copy of the GNU General Public License along |
| 40 | # with this program; if not, write to the Free Software Foundation, Inc., |
| 41 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 42 | # |
| 43 | # ********** |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 44 | |
| 45 | set -eu |
| 46 | |
| 47 | if [ $# -ne 2 ]; then |
| 48 | echo "Usage: $0 path/to/config.pl path/to/config.h" >&2 |
| 49 | exit 1 |
| 50 | fi |
| 51 | |
| 52 | SCRIPT=$1 |
| 53 | FILE=$2 |
| 54 | |
| 55 | conf() { |
| 56 | $SCRIPT -f $FILE $@ |
| 57 | } |
| 58 | |
Simon Butcher | b2c81b1 | 2016-06-23 13:56:06 +0100 | [diff] [blame] | 59 | |
| 60 | # Set the target specific header |
Simon Butcher | 1d46a2d | 2016-07-11 10:17:03 +0100 | [diff] [blame] | 61 | conf set YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE \"mbedtls/target_config.h\" |
Simon Butcher | b2c81b1 | 2016-06-23 13:56:06 +0100 | [diff] [blame] | 62 | |
Manuel Pégourié-Gonnard | 0adc7f7 | 2015-07-31 17:50:00 +0200 | [diff] [blame] | 63 | # not supported on mbed OS, nor used by mbed Client |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 64 | conf unset MBEDTLS_NET_C |
| 65 | conf unset MBEDTLS_TIMING_C |
| 66 | |
Manuel Pégourié-Gonnard | 0adc7f7 | 2015-07-31 17:50:00 +0200 | [diff] [blame] | 67 | # not supported on all targets with mbed OS, nor used by mbed Client |
| 68 | conf unset MBEDTLS_FS_IO |
| 69 | |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 70 | conf unset MBEDTLS_CIPHER_MODE_CFB |
| 71 | conf unset MBEDTLS_CIPHER_MODE_CTR |
| 72 | conf unset MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS |
| 73 | conf unset MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN |
| 74 | conf unset MBEDTLS_CIPHER_PADDING_ZEROS |
| 75 | conf unset MBEDTLS_ECP_DP_SECP192R1_ENABLED |
| 76 | conf unset MBEDTLS_ECP_DP_SECP224R1_ENABLED |
| 77 | conf unset MBEDTLS_ECP_DP_SECP521R1_ENABLED |
| 78 | conf unset MBEDTLS_ECP_DP_SECP192K1_ENABLED |
| 79 | conf unset MBEDTLS_ECP_DP_SECP224K1_ENABLED |
| 80 | conf unset MBEDTLS_ECP_DP_SECP256K1_ENABLED |
| 81 | conf unset MBEDTLS_ECP_DP_BP256R1_ENABLED |
| 82 | conf unset MBEDTLS_ECP_DP_BP384R1_ENABLED |
| 83 | conf unset MBEDTLS_ECP_DP_BP512R1_ENABLED |
| 84 | conf unset MBEDTLS_PK_PARSE_EC_EXTENDED |
| 85 | |
| 86 | conf unset MBEDTLS_AESNI_C |
| 87 | conf unset MBEDTLS_ARC4_C |
| 88 | conf unset MBEDTLS_BLOWFISH_C |
| 89 | conf unset MBEDTLS_CAMELLIA_C |
| 90 | conf unset MBEDTLS_DES_C |
| 91 | conf unset MBEDTLS_DHM_C |
| 92 | conf unset MBEDTLS_GENPRIME |
| 93 | conf unset MBEDTLS_MD5_C |
| 94 | conf unset MBEDTLS_PADLOCK_C |
| 95 | conf unset MBEDTLS_PEM_WRITE_C |
| 96 | conf unset MBEDTLS_PKCS5_C |
| 97 | conf unset MBEDTLS_PKCS12_C |
| 98 | conf unset MBEDTLS_RIPEMD160_C |
Manuel Pégourié-Gonnard | c5e0372 | 2015-07-28 17:09:42 +0200 | [diff] [blame] | 99 | conf unset MBEDTLS_SHA1_C |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 100 | conf unset MBEDTLS_XTEA_C |
| 101 | |
| 102 | conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 103 | |
| 104 | conf unset MBEDTLS_X509_CSR_PARSE_C |
| 105 | conf unset MBEDTLS_X509_CREATE_C |
| 106 | conf unset MBEDTLS_X509_CRT_WRITE_C |
| 107 | conf unset MBEDTLS_X509_CSR_WRITE_C |
| 108 | |
| 109 | conf unset MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED |
| 110 | conf unset MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED |
| 111 | conf unset MBEDTLS_KEY_EXCHANGE_RSA_ENABLED |
| 112 | conf unset MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED |
| 113 | conf unset MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED |
| 114 | conf unset MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED |
| 115 | conf unset MBEDTLS_SSL_FALLBACK_SCSV |
| 116 | conf unset MBEDTLS_SSL_CBC_RECORD_SPLITTING |
Manuel Pégourié-Gonnard | 63e7eba | 2015-07-28 14:17:48 +0200 | [diff] [blame] | 117 | conf unset MBEDTLS_SSL_PROTO_TLS1 |
| 118 | conf unset MBEDTLS_SSL_PROTO_TLS1_1 |
| 119 | conf unset MBEDTLS_SSL_TRUNCATED_HMAC |