Skip to content

Commit 24b8f9f

Browse files
authored
Merge pull request #223 from Patater/tls-development-20190815
Update Mbed Crypto with latest Mbed TLS changes as of 2018-08-15
2 parents 0ed1df6 + 9d20e1f commit 24b8f9f

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

include/mbedtls/bn_mul.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@
642642
"r6", "r7", "r8", "r9", "cc" \
643643
);
644644

645-
#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)
645+
#elif (__ARM_ARCH >= 6) && \
646+
defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)
646647

647648
#define MULADDC_INIT \
648649
asm(

library/ecdsa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static void ecdsa_restart_det_free( mbedtls_ecdsa_restart_det_ctx *ctx )
172172
}
173173
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
174174

175-
#define ECDSA_RS_ECP ( rs_ctx == NULL ? NULL : &rs_ctx->ecp )
175+
#define ECDSA_RS_ECP ( rs_ctx == NULL ? NULL : &rs_ctx->ecp )
176176

177177
/* Utility macro for checking and updating ops budget */
178178
#define ECDSA_BUDGET( ops ) \

tests/scripts/all.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,26 @@ component_test_aes_fewer_tables_and_rom_tables () {
831831
component_test_make_shared () {
832832
msg "build/test: make shared" # ~ 40s
833833
make SHARED=1 all check -j1
834+
ldd programs/util/strerror | grep libmbedcrypto
835+
}
836+
837+
component_test_cmake_shared () {
838+
msg "build/test: cmake shared" # ~ 2min
839+
cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On .
840+
make
841+
ldd programs/util/strerror | grep libmbedcrypto
842+
make test
843+
}
844+
845+
component_build_mbedtls_config_file () {
846+
msg "build: make with MBEDTLS_CONFIG_FILE" # ~40s
847+
# Use the full config so as to catch a maximum of places where
848+
# the check of MBEDTLS_CONFIG_FILE might be missing.
849+
scripts/config.pl full
850+
sed 's!"check_config.h"!"mbedtls/check_config.h"!' <"$CONFIG_H" >full_config.h
851+
echo '#error "MBEDTLS_CONFIG_FILE is not working"' >"$CONFIG_H"
852+
make CFLAGS="-I '$PWD' -DMBEDTLS_CONFIG_FILE='\"full_config.h\"'"
853+
rm -f full_config.h
834854
}
835855

836856
component_test_m32_o0 () {
@@ -940,6 +960,17 @@ component_build_arm_none_eabi_gcc () {
940960
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' lib
941961
}
942962

963+
component_build_arm_none_eabi_gcc_arm5vte () {
964+
msg "build: arm-none-eabi-gcc -march=arm5vte, make" # ~ 10s
965+
scripts/config.pl baremetal
966+
# Build for a target platform that's close to what Debian uses
967+
# for its "armel" distribution (https://wiki.debian.org/ArmEabiPort).
968+
# See https://github.com/ARMmbed/mbedtls/pull/2169 and comments.
969+
# It would be better to build with arm-linux-gnueabi-gcc but
970+
# we don't have that on our CI at this time.
971+
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar CFLAGS='-Werror -Wall -Wextra -march=armv5te -O1' LDFLAGS='-march=armv5te' SHELL='sh -x' lib
972+
}
973+
943974
component_build_arm_none_eabi_gcc_no_udbl_division () {
944975
msg "build: arm-none-eabi-gcc -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
945976
scripts/config.pl baremetal

0 commit comments

Comments
 (0)