blob: 96ab4dba45d60406c3a222bfd3c94e3d259f6631 [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#
3# Copyright (C) 2015-2016, Arm Limited, All Rights Reserved
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# **********
44#
Bence Szépkútib7246ad2020-05-26 00:33:31 +020045# This file is part of Mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +020046
47set -eu
48
49if [ $# -ne 2 ]; then
50 echo "Usage: $0 path/to/config.pl path/to/config.h" >&2
51 exit 1
52fi
53
54SCRIPT=$1
55FILE=$2
56
57conf() {
58 $SCRIPT -f $FILE $@
59}
60
Simon Butcherb2c81b12016-06-23 13:56:06 +010061
62# Set the target specific header
Simon Butcher1d46a2d2016-07-11 10:17:03 +010063conf set YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE \"mbedtls/target_config.h\"
Simon Butcherb2c81b12016-06-23 13:56:06 +010064
Manuel Pégourié-Gonnard0adc7f72015-07-31 17:50:00 +020065# not supported on mbed OS, nor used by mbed Client
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +020066conf unset MBEDTLS_NET_C
67conf unset MBEDTLS_TIMING_C
68
Manuel Pégourié-Gonnard0adc7f72015-07-31 17:50:00 +020069# not supported on all targets with mbed OS, nor used by mbed Client
70conf unset MBEDTLS_FS_IO
71
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +020072conf unset MBEDTLS_CIPHER_MODE_CFB
73conf unset MBEDTLS_CIPHER_MODE_CTR
74conf unset MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
75conf unset MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
76conf unset MBEDTLS_CIPHER_PADDING_ZEROS
77conf unset MBEDTLS_ECP_DP_SECP192R1_ENABLED
78conf unset MBEDTLS_ECP_DP_SECP224R1_ENABLED
79conf unset MBEDTLS_ECP_DP_SECP521R1_ENABLED
80conf unset MBEDTLS_ECP_DP_SECP192K1_ENABLED
81conf unset MBEDTLS_ECP_DP_SECP224K1_ENABLED
82conf unset MBEDTLS_ECP_DP_SECP256K1_ENABLED
83conf unset MBEDTLS_ECP_DP_BP256R1_ENABLED
84conf unset MBEDTLS_ECP_DP_BP384R1_ENABLED
85conf unset MBEDTLS_ECP_DP_BP512R1_ENABLED
86conf unset MBEDTLS_PK_PARSE_EC_EXTENDED
87
88conf unset MBEDTLS_AESNI_C
89conf unset MBEDTLS_ARC4_C
90conf unset MBEDTLS_BLOWFISH_C
91conf unset MBEDTLS_CAMELLIA_C
92conf unset MBEDTLS_DES_C
93conf unset MBEDTLS_DHM_C
94conf unset MBEDTLS_GENPRIME
95conf unset MBEDTLS_MD5_C
96conf unset MBEDTLS_PADLOCK_C
97conf unset MBEDTLS_PEM_WRITE_C
98conf unset MBEDTLS_PKCS5_C
99conf unset MBEDTLS_PKCS12_C
100conf unset MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardc5e03722015-07-28 17:09:42 +0200101conf unset MBEDTLS_SHA1_C
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +0200102conf unset MBEDTLS_XTEA_C
103
104conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT
105
106conf unset MBEDTLS_X509_CSR_PARSE_C
107conf unset MBEDTLS_X509_CREATE_C
108conf unset MBEDTLS_X509_CRT_WRITE_C
109conf unset MBEDTLS_X509_CSR_WRITE_C
110
111conf unset MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
112conf unset MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
113conf unset MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
114conf unset MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
115conf unset MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
116conf unset MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
117conf unset MBEDTLS_SSL_FALLBACK_SCSV
118conf unset MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnard63e7eba2015-07-28 14:17:48 +0200119conf unset MBEDTLS_SSL_PROTO_TLS1
120conf unset MBEDTLS_SSL_PROTO_TLS1_1
121conf unset MBEDTLS_SSL_TRUNCATED_HMAC