File tree 3 files changed +42
-1
lines changed
features/mbedtls/importer 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,9 @@ deploy: rsync
68
68
# Adjusting the default mbed TLS config file to mbed purposes
69
69
./adjust-config.sh $(MBED_TLS_DIR ) /scripts/config.pl $(TARGET_INC ) /mbedtls/config.h
70
70
#
71
- # Copy the trimmed config that does not require entropy source
71
+ # Copy and adjust the trimmed config that does not require entropy source
72
72
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
73
74
74
75
deploy-tests : deploy
75
76
#
Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ conf unset MBEDTLS_RIPEMD160_C
112
112
conf unset MBEDTLS_SHA1_C
113
113
conf unset MBEDTLS_XTEA_C
114
114
115
+ conf set MBEDTLS_CMAC_C
116
+
115
117
conf set MBEDTLS_AES_ROM_TABLES
116
118
117
119
conf 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) 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-no-entropy-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