blob: 547565436d92755c950ae2eb109d46d9aacdf9c8 [file] [log] [blame]
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +02001#!/bin/sh
Bence Szépkútib7246ad2020-05-26 00:33:31 +02002#
Bence Szépkúti44bfbe32020-08-19 16:54:51 +02003# Copyright The Mbed TLS Contributors
Bence Szépkúti4e9f7122020-06-05 13:02:18 +02004# 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úti09b4f192020-05-26 01:54:15 +020011#
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útib7246ad2020-05-26 00:33:31 +020023#
Bence Szépkúti4e9f7122020-06-05 13:02:18 +020024# **********
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é-Gonnard63e7eba2015-07-28 14:17:48 +020044
45set -eu
46
47if [ $# -ne 2 ]; then
48 echo "Usage: $0 path/to/config.pl path/to/config.h" >&2
49 exit 1
50fi
51
52SCRIPT=$1
53FILE=$2
54
55conf() {
56 $SCRIPT -f $FILE $@
57}
58
Simon Butcherb2c81b12016-06-23 13:56:06 +010059
60# Set the target specific header
Simon Butcher1d46a2d2016-07-11 10:17:03 +010061conf set YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE \"mbedtls/target_config.h\"
Simon Butcherb2c81b12016-06-23 13:56:06 +010062
Manuel Pégourié-Gonnard0adc7f72015-07-31 17:50:00 +020063# not supported on mbed OS, nor used by mbed Client
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +020064conf unset MBEDTLS_NET_C
65conf unset MBEDTLS_TIMING_C
66
Manuel Pégourié-Gonnard0adc7f72015-07-31 17:50:00 +020067# not supported on all targets with mbed OS, nor used by mbed Client
68conf unset MBEDTLS_FS_IO
69
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +020070conf unset MBEDTLS_CIPHER_MODE_CFB
71conf unset MBEDTLS_CIPHER_MODE_CTR
72conf unset MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
73conf unset MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
74conf unset MBEDTLS_CIPHER_PADDING_ZEROS
75conf unset MBEDTLS_ECP_DP_SECP192R1_ENABLED
76conf unset MBEDTLS_ECP_DP_SECP224R1_ENABLED
77conf unset MBEDTLS_ECP_DP_SECP521R1_ENABLED
78conf unset MBEDTLS_ECP_DP_SECP192K1_ENABLED
79conf unset MBEDTLS_ECP_DP_SECP224K1_ENABLED
80conf unset MBEDTLS_ECP_DP_SECP256K1_ENABLED
81conf unset MBEDTLS_ECP_DP_BP256R1_ENABLED
82conf unset MBEDTLS_ECP_DP_BP384R1_ENABLED
83conf unset MBEDTLS_ECP_DP_BP512R1_ENABLED
84conf unset MBEDTLS_PK_PARSE_EC_EXTENDED
85
86conf unset MBEDTLS_AESNI_C
87conf unset MBEDTLS_ARC4_C
88conf unset MBEDTLS_BLOWFISH_C
89conf unset MBEDTLS_CAMELLIA_C
90conf unset MBEDTLS_DES_C
91conf unset MBEDTLS_DHM_C
92conf unset MBEDTLS_GENPRIME
93conf unset MBEDTLS_MD5_C
94conf unset MBEDTLS_PADLOCK_C
95conf unset MBEDTLS_PEM_WRITE_C
96conf unset MBEDTLS_PKCS5_C
97conf unset MBEDTLS_PKCS12_C
98conf unset MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardc5e03722015-07-28 17:09:42 +020099conf unset MBEDTLS_SHA1_C
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +0200100conf unset MBEDTLS_XTEA_C
101
102conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT
103
104conf unset MBEDTLS_X509_CSR_PARSE_C
105conf unset MBEDTLS_X509_CREATE_C
106conf unset MBEDTLS_X509_CRT_WRITE_C
107conf unset MBEDTLS_X509_CSR_WRITE_C
108
109conf unset MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
110conf unset MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
111conf unset MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
112conf unset MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
113conf unset MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
114conf unset MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
115conf unset MBEDTLS_SSL_FALLBACK_SCSV
116conf unset MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +0200117conf unset MBEDTLS_SSL_PROTO_TLS1
118conf unset MBEDTLS_SSL_PROTO_TLS1_1
119conf unset MBEDTLS_SSL_TRUNCATED_HMAC