File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed
features/mbedtls/importer Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,9 @@ deploy: rsync
6868 # Adjusting the default mbed TLS config file to mbed purposes
6969 ./adjust-config.sh $(MBED_TLS_DIR ) /scripts/config.pl $(TARGET_INC ) /mbedtls/config.h
7070 #
71- # Copy the trimmed config that does not require entropy source
71+ # Copy and adjust the trimmed config that does not require entropy source
7272 cp $(MBED_TLS_DIR ) /configs/config-no-entropy.h $(TARGET_INC ) /mbedtls/.
73+ ./adjust-no-entropy-config.sh $(MBED_TLS_DIR ) /scripts/config.pl $(TARGET_INC ) /mbedtls/config-no-entropy.h
7374
7475deploy-tests : deploy
7576 #
Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ conf unset MBEDTLS_RIPEMD160_C
112112conf unset MBEDTLS_SHA1_C
113113conf unset MBEDTLS_XTEA_C
114114
115+ conf set MBEDTLS_CMAC_C
116+
115117conf set MBEDTLS_AES_ROM_TABLES
116118
117119conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ # This file is part of mbed TLS (https://tls.mbed.org)
4+ #
5+ # Copyright (c) 2015-2018, ARM Limited, All Rights Reserved
6+ #
7+ # Purpose
8+ #
9+ # Comments and uncomments #define lines in the given configuration header file
10+ # to configure the file for use in mbed OS.
11+ #
12+ # Usage: adjust-config.sh [path to config script] [path to no-entropy config file]
13+ #
14+ set -eu
15+
16+ if [ $# -ne 2 ]; then
17+ echo " Usage: $0 path/to/config.pl path/to/config.h" >&2
18+ exit 1
19+ fi
20+
21+ SCRIPT=$1
22+ FILE=$2
23+
24+ conf () {
25+ $SCRIPT -o -f $FILE $@
26+ }
27+
28+ add_code () {
29+ MATCH_PATTERN=" $1 "
30+ shift
31+ CODE=$( IFS=" " ; printf " %s" " $* " )
32+
33+ perl -i -pe \
34+ " s/$MATCH_PATTERN /$MATCH_PATTERN$CODE /igs" \
35+ " $FILE "
36+ }
37+
38+ conf set MBEDTLS_CMAC_C
You can’t perform that action at this time.
0 commit comments