From 40741f8ce5841c507155bf7954b08ffdcb64100a Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 14 Mar 2018 17:24:01 -0400 Subject: [PATCH 1/7] Add a test with a cpp executable including all mbed TLS headers In case of any problems with the 'extern "C"' directives, building the executable will fail --- CMakeLists.txt | 2 +- programs/.gitignore | 1 + programs/Makefile | 7 ++ programs/test/CMakeLists.txt | 3 + programs/test/header_test.cpp | 123 ++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 programs/test/header_test.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ade1d4cb..2a10d7caf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.6) -project("mbed TLS" C) +project("mbed TLS" C CXX) option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) diff --git a/programs/.gitignore b/programs/.gitignore index ddfa1a426..5bbe2e825 100644 --- a/programs/.gitignore +++ b/programs/.gitignore @@ -45,6 +45,7 @@ ssl/mini_client test/benchmark test/ecp-bench test/selftest +test/header_test test/ssl_cert_test test/udp_proxy test/zeroize diff --git a/programs/Makefile b/programs/Makefile index 080e82d88..c5dd9f9ee 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -4,9 +4,11 @@ CFLAGS ?= -O2 WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement +WARNING_CXXFLAGS ?= -Wall -W LDFLAGS ?= LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64 +LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I../include -D_FILE_OFFSET_BITS=64 LOCAL_LDFLAGS = -L../library \ -lmbedtls$(SHARED_SUFFIX) \ -lmbedx509$(SHARED_SUFFIX) \ @@ -68,6 +70,7 @@ APPS = aes/aescrypt2$(EXEXT) aes/crypt_and_hash$(EXEXT) \ test/ssl_cert_test$(EXEXT) test/benchmark$(EXEXT) \ test/selftest$(EXEXT) test/udp_proxy$(EXEXT) \ test/zeroize$(EXEXT) \ + test/header_test$(EXEXT) \ util/pem2der$(EXEXT) util/strerror$(EXEXT) \ x509/cert_app$(EXEXT) x509/crl_app$(EXEXT) \ x509/cert_req$(EXEXT) x509/cert_write$(EXEXT) \ @@ -242,6 +245,10 @@ test/benchmark$(EXEXT): test/benchmark.c $(DEP) echo " CC test/benchmark.c" $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/benchmark.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ +test/header_test$(EXEXT): test/header_test.cpp $(DEP) + echo " CXX test/header_test.cpp" + $(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/header_test.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ + test/selftest$(EXEXT): test/selftest.c $(DEP) echo " CC test/selftest.c" $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/selftest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 0c5ce27f7..32c141551 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -16,6 +16,9 @@ target_link_libraries(selftest ${libs}) add_executable(benchmark benchmark.c) target_link_libraries(benchmark ${libs}) +add_executable(header_test header_test.cpp) +target_link_libraries(header_test ${libs}) + add_executable(ssl_cert_test ssl_cert_test.c) target_link_libraries(ssl_cert_test ${libs}) diff --git a/programs/test/header_test.cpp b/programs/test/header_test.cpp new file mode 100644 index 000000000..d1ddd4ba0 --- /dev/null +++ b/programs/test/header_test.cpp @@ -0,0 +1,123 @@ +/* + * A C++ program that includes all of the mbed TLS header files, in order to + * test if no errors are raised in the process. + * + * Copyright (C) 2018, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This file is part of mbed TLS (https://tls.mbed.org) + */ + +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + +#include "mbedtls/aes.h" +#include "mbedtls/aesni.h" +#include "mbedtls/arc4.h" +#include "mbedtls/aria.h" +#include "mbedtls/asn1.h" +#include "mbedtls/asn1write.h" +#include "mbedtls/base64.h" +#include "mbedtls/bignum.h" +#include "mbedtls/blowfish.h" +#include "mbedtls/bn_mul.h" +#include "mbedtls/camellia.h" +#include "mbedtls/ccm.h" +#include "mbedtls/certs.h" +#include "mbedtls/chacha20.h" +#include "mbedtls/chachapoly.h" +#include "mbedtls/cipher.h" +#include "mbedtls/cipher_internal.h" +#include "mbedtls/cmac.h" +#include "mbedtls/compat-1.3.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/debug.h" +#include "mbedtls/des.h" +#include "mbedtls/dhm.h" +#include "mbedtls/ecdh.h" +#include "mbedtls/ecdsa.h" +#include "mbedtls/ecjpake.h" +#include "mbedtls/ecp.h" +#include "mbedtls/ecp_internal.h" +#include "mbedtls/entropy.h" +#include "mbedtls/entropy_poll.h" +#include "mbedtls/error.h" +#include "mbedtls/gcm.h" +#include "mbedtls/havege.h" +#include "mbedtls/hkdf.h" +#include "mbedtls/hmac_drbg.h" +#include "mbedtls/md2.h" +#include "mbedtls/md4.h" +#include "mbedtls/md5.h" +#include "mbedtls/md.h" +#include "mbedtls/md_internal.h" +#include "mbedtls/net.h" +#include "mbedtls/net_sockets.h" +#include "mbedtls/oid.h" +#include "mbedtls/padlock.h" +#include "mbedtls/pem.h" +#include "mbedtls/pkcs11.h" +#include "mbedtls/pkcs12.h" +#include "mbedtls/pkcs5.h" +#include "mbedtls/pk.h" +#include "mbedtls/pk_internal.h" +#include "mbedtls/platform_time.h" +#include "mbedtls/platform_util.h" +#include "mbedtls/poly1305.h" +#include "mbedtls/ripemd160.h" +#include "mbedtls/rsa.h" +#include "mbedtls/rsa_internal.h" +#include "mbedtls/sha1.h" +#include "mbedtls/sha256.h" +#include "mbedtls/sha512.h" +#include "mbedtls/ssl_cache.h" +#include "mbedtls/ssl_ciphersuites.h" +#include "mbedtls/ssl_cookie.h" +#include "mbedtls/ssl.h" +#include "mbedtls/ssl_internal.h" +#include "mbedtls/ssl_ticket.h" +#include "mbedtls/threading.h" +#include "mbedtls/timing.h" +#include "mbedtls/version.h" +#include "mbedtls/x509_crl.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/x509_csr.h" +#include "mbedtls/x509.h" +#include "mbedtls/xtea.h" + +#if defined(MBEDTLS_PLATFORM_C) +#include "mbedtls/platform.h" +#else +#include +#include +#define mbedtls_printf printf +#define mbedtls_snprintf snprintf +#define mbedtls_exit exit +#define MBEDTLS_EXIT_SUCCESS EXIT_SUCCESS +#define MBEDTLS_EXIT_FAILURE EXIT_FAILURE +#endif + +#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) +#include "mbedtls/memory_buffer_alloc.h" +#endif + +int main( int argc, char *argv[] ) +{ + (void) argc; + (void) argv; +} From 0211c32c9af554a816401efa14064f058bd5aeb1 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Thu, 15 Mar 2018 05:16:24 -0400 Subject: [PATCH 2/7] Change the cpp test to be optional Remove unnecessary defines from the test. Test by defining TEST_CPP using makefiles or cmake. --- CMakeLists.txt | 6 +++++- programs/Makefile | 5 ++++- programs/test/CMakeLists.txt | 8 +++++--- programs/test/header_test.cpp | 8 -------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a10d7caf..6133d07fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 2.6) -project("mbed TLS" C CXX) +if(TEST_CPP) + project("mbed TLS" C CXX) +else() + project("mbed TLS" C) +endif() option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) diff --git a/programs/Makefile b/programs/Makefile index c5dd9f9ee..844d680f2 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -70,7 +70,6 @@ APPS = aes/aescrypt2$(EXEXT) aes/crypt_and_hash$(EXEXT) \ test/ssl_cert_test$(EXEXT) test/benchmark$(EXEXT) \ test/selftest$(EXEXT) test/udp_proxy$(EXEXT) \ test/zeroize$(EXEXT) \ - test/header_test$(EXEXT) \ util/pem2der$(EXEXT) util/strerror$(EXEXT) \ x509/cert_app$(EXEXT) x509/crl_app$(EXEXT) \ x509/cert_req$(EXEXT) x509/cert_write$(EXEXT) \ @@ -80,6 +79,10 @@ ifdef PTHREAD APPS += ssl/ssl_pthread_server$(EXEXT) endif +ifdef TEST_CPP +APPS += test/header_test$(EXEXT) +endif + .SILENT: .PHONY: all clean list diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 32c141551..6791ffdb0 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -16,9 +16,11 @@ target_link_libraries(selftest ${libs}) add_executable(benchmark benchmark.c) target_link_libraries(benchmark ${libs}) -add_executable(header_test header_test.cpp) -target_link_libraries(header_test ${libs}) - +if(TEST_CPP) + add_executable(header_test header_test.cpp) + target_link_libraries(header_test ${libs}) +endif() + add_executable(ssl_cert_test ssl_cert_test.c) target_link_libraries(ssl_cert_test ${libs}) diff --git a/programs/test/header_test.cpp b/programs/test/header_test.cpp index d1ddd4ba0..69d7c4ac8 100644 --- a/programs/test/header_test.cpp +++ b/programs/test/header_test.cpp @@ -102,14 +102,6 @@ #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#define mbedtls_exit exit -#define MBEDTLS_EXIT_SUCCESS EXIT_SUCCESS -#define MBEDTLS_EXIT_FAILURE EXIT_FAILURE #endif #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) From 89c048c101930a60f496fde68f21e7fa0831cd84 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Fri, 16 Mar 2018 07:37:44 -0400 Subject: [PATCH 3/7] Tests: add a test for cpp linking Change the name of header_test to cpp_dumy_build Update the test description to better reflect its contents --- programs/.gitignore | 2 +- programs/Makefile | 8 ++++---- programs/test/CMakeLists.txt | 4 ++-- .../test/{header_test.cpp => cpp_dummy_build.cpp} | 12 +++++++----- 4 files changed, 14 insertions(+), 12 deletions(-) rename programs/test/{header_test.cpp => cpp_dummy_build.cpp} (91%) diff --git a/programs/.gitignore b/programs/.gitignore index 5bbe2e825..02418966f 100644 --- a/programs/.gitignore +++ b/programs/.gitignore @@ -45,7 +45,7 @@ ssl/mini_client test/benchmark test/ecp-bench test/selftest -test/header_test +test/cpp_dummy_build test/ssl_cert_test test/udp_proxy test/zeroize diff --git a/programs/Makefile b/programs/Makefile index 844d680f2..b6d1fa25b 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -80,7 +80,7 @@ APPS += ssl/ssl_pthread_server$(EXEXT) endif ifdef TEST_CPP -APPS += test/header_test$(EXEXT) +APPS += test/cpp_dummy_build$(EXEXT) endif .SILENT: @@ -248,9 +248,9 @@ test/benchmark$(EXEXT): test/benchmark.c $(DEP) echo " CC test/benchmark.c" $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/benchmark.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ -test/header_test$(EXEXT): test/header_test.cpp $(DEP) - echo " CXX test/header_test.cpp" - $(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/header_test.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ +test/cpp_dummy_build$(EXEXT): test/cpp_dummy_build.cpp $(DEP) + echo " CXX test/cpp_dummy_build.cpp" + $(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ test/selftest$(EXEXT): test/selftest.c $(DEP) echo " CC test/selftest.c" diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 6791ffdb0..994e92c54 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -17,8 +17,8 @@ add_executable(benchmark benchmark.c) target_link_libraries(benchmark ${libs}) if(TEST_CPP) - add_executable(header_test header_test.cpp) - target_link_libraries(header_test ${libs}) + add_executable(cpp_dummy_build cpp_dummy_build.cpp) + target_link_libraries(cpp_dummy_build ${libs}) endif() add_executable(ssl_cert_test ssl_cert_test.c) diff --git a/programs/test/header_test.cpp b/programs/test/cpp_dummy_build.cpp similarity index 91% rename from programs/test/header_test.cpp rename to programs/test/cpp_dummy_build.cpp index 69d7c4ac8..03373a917 100644 --- a/programs/test/header_test.cpp +++ b/programs/test/cpp_dummy_build.cpp @@ -1,6 +1,6 @@ /* - * A C++ program that includes all of the mbed TLS header files, in order to - * test if no errors are raised in the process. + * This program is a dummy C++ program to ensure Mbed TLS library header files + * can be included and built with a C++ compiler. * * Copyright (C) 2018, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 @@ -108,8 +108,10 @@ #include "mbedtls/memory_buffer_alloc.h" #endif -int main( int argc, char *argv[] ) +int main() { - (void) argc; - (void) argv; + mbedtls_platform_context *ctx = NULL; + mbedtls_platform_setup(ctx); + mbedtls_printf("CPP Build test\n"); + mbedtls_platform_teardown(ctx); } From 037ec4b416af07ddd9fa66526da4eeba5bbfbeb0 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Tue, 26 Jun 2018 06:57:55 -0400 Subject: [PATCH 4/7] Replace tabs with spaces --- CMakeLists.txt | 4 ++-- programs/test/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6133d07fa..4dbe76ecc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 2.6) if(TEST_CPP) - project("mbed TLS" C CXX) + project("mbed TLS" C CXX) else() - project("mbed TLS" C) + project("mbed TLS" C) endif() option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 994e92c54..9ca0cb222 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -17,8 +17,8 @@ add_executable(benchmark benchmark.c) target_link_libraries(benchmark ${libs}) if(TEST_CPP) - add_executable(cpp_dummy_build cpp_dummy_build.cpp) - target_link_libraries(cpp_dummy_build ${libs}) + add_executable(cpp_dummy_build cpp_dummy_build.cpp) + target_link_libraries(cpp_dummy_build ${libs}) endif() add_executable(ssl_cert_test ssl_cert_test.c) From 45a671959476f756608fd975dacc31e5613d0b51 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Tue, 26 Jun 2018 07:50:19 -0400 Subject: [PATCH 5/7] Add a CXX build to all.sh to execute the C++ dummy test by default --- tests/scripts/all.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index ded43f9c9..1f9d40baf 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -35,6 +35,7 @@ # * GNU Make # * CMake # * GCC and Clang (recent enough for using ASan with gcc and MemSan with clang, or valgrind) +# * G++, unless invoked with --no-cxx # * arm-gcc and mingw-gcc # * ArmCC 5 and ArmCC 6, unless invoked with --no-armcc # * Yotta build dependencies, unless invoked with --no-yotta @@ -96,6 +97,7 @@ FORCE=0 KEEP_GOING=0 RUN_ARMCC=1 YOTTA=1 +TEST_CXX=1 # Default commands, can be overriden by the environment : ${OPENSSL:="openssl"} @@ -130,6 +132,7 @@ General options: --no-keep-going Stop at the first error (default). --no-memory No additional memory tests (default). --no-yotta Skip yotta module build. + --no-cxx Skip CXX Compiler build. --out-of-source-dir= Directory used for CMake out-of-source build tests. --random-seed Use a random seed value for randomized tests (default). -r|--release-test Run this script in release mode. This fixes the seed value to 1. @@ -580,6 +583,17 @@ msg "test/build: key-exchanges (gcc)" # ~ 1 min cleanup record_status tests/scripts/key-exchanges.pl +if [ $TEST_CXX -ne 0 ]; then + msg "build: Unix make, gcc and g++ test" # ~ 30s + cleanup + make TEST_CPP=1 + + msg "build: cmake, gcc and g++ test" # ~ 30s + cleanup + CC=gcc cmake -D TEST_CPP=YES . + make +fi + msg "build: Unix make, -Os (gcc)" # ~ 30s cleanup make CC=gcc CFLAGS='-Werror -Wall -Wextra -Os' From 05be06cc2dd62a1a1301ce87b72b256ef73fc2ca Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Thu, 28 Jun 2018 04:41:50 -0400 Subject: [PATCH 6/7] Make the C++ test mandatory by removing the --no-cxx flag from all.sh Remove the cmake test --- tests/scripts/all.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 1f9d40baf..bbfbfbc1c 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -35,7 +35,7 @@ # * GNU Make # * CMake # * GCC and Clang (recent enough for using ASan with gcc and MemSan with clang, or valgrind) -# * G++, unless invoked with --no-cxx +# * G++ # * arm-gcc and mingw-gcc # * ArmCC 5 and ArmCC 6, unless invoked with --no-armcc # * Yotta build dependencies, unless invoked with --no-yotta @@ -97,7 +97,6 @@ FORCE=0 KEEP_GOING=0 RUN_ARMCC=1 YOTTA=1 -TEST_CXX=1 # Default commands, can be overriden by the environment : ${OPENSSL:="openssl"} @@ -132,7 +131,6 @@ General options: --no-keep-going Stop at the first error (default). --no-memory No additional memory tests (default). --no-yotta Skip yotta module build. - --no-cxx Skip CXX Compiler build. --out-of-source-dir= Directory used for CMake out-of-source build tests. --random-seed Use a random seed value for randomized tests (default). -r|--release-test Run this script in release mode. This fixes the seed value to 1. @@ -583,16 +581,9 @@ msg "test/build: key-exchanges (gcc)" # ~ 1 min cleanup record_status tests/scripts/key-exchanges.pl -if [ $TEST_CXX -ne 0 ]; then - msg "build: Unix make, gcc and g++ test" # ~ 30s - cleanup - make TEST_CPP=1 - - msg "build: cmake, gcc and g++ test" # ~ 30s - cleanup - CC=gcc cmake -D TEST_CPP=YES . - make -fi +msg "build: Unix make, gcc and g++ test" # ~ 30s +cleanup +make TEST_CPP=1 msg "build: Unix make, -Os (gcc)" # ~ 30s cleanup From 991f9fefd9f0db6eeea3ee05076c84a9cccdcb29 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Mon, 2 Jul 2018 09:08:21 -0400 Subject: [PATCH 7/7] all_sh: add a check for header inclusion in cpp_dummy_build.cpp change the g++ test to be incremental, to save time reorganize header order in cpp_dummy_build.cpp according to c locale --- programs/test/cpp_dummy_build.cpp | 11 ++++++----- tests/scripts/all.sh | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/programs/test/cpp_dummy_build.cpp b/programs/test/cpp_dummy_build.cpp index 03373a917..41c24c981 100644 --- a/programs/test/cpp_dummy_build.cpp +++ b/programs/test/cpp_dummy_build.cpp @@ -41,6 +41,7 @@ #include "mbedtls/certs.h" #include "mbedtls/chacha20.h" #include "mbedtls/chachapoly.h" +#include "mbedtls/check_config.h" #include "mbedtls/cipher.h" #include "mbedtls/cipher_internal.h" #include "mbedtls/cmac.h" @@ -61,21 +62,21 @@ #include "mbedtls/havege.h" #include "mbedtls/hkdf.h" #include "mbedtls/hmac_drbg.h" +#include "mbedtls/md.h" #include "mbedtls/md2.h" #include "mbedtls/md4.h" #include "mbedtls/md5.h" -#include "mbedtls/md.h" #include "mbedtls/md_internal.h" #include "mbedtls/net.h" #include "mbedtls/net_sockets.h" #include "mbedtls/oid.h" #include "mbedtls/padlock.h" #include "mbedtls/pem.h" +#include "mbedtls/pk.h" +#include "mbedtls/pk_internal.h" #include "mbedtls/pkcs11.h" #include "mbedtls/pkcs12.h" #include "mbedtls/pkcs5.h" -#include "mbedtls/pk.h" -#include "mbedtls/pk_internal.h" #include "mbedtls/platform_time.h" #include "mbedtls/platform_util.h" #include "mbedtls/poly1305.h" @@ -85,19 +86,19 @@ #include "mbedtls/sha1.h" #include "mbedtls/sha256.h" #include "mbedtls/sha512.h" +#include "mbedtls/ssl.h" #include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_ciphersuites.h" #include "mbedtls/ssl_cookie.h" -#include "mbedtls/ssl.h" #include "mbedtls/ssl_internal.h" #include "mbedtls/ssl_ticket.h" #include "mbedtls/threading.h" #include "mbedtls/timing.h" #include "mbedtls/version.h" +#include "mbedtls/x509.h" #include "mbedtls/x509_crl.h" #include "mbedtls/x509_crt.h" #include "mbedtls/x509_csr.h" -#include "mbedtls/x509.h" #include "mbedtls/xtea.h" #if defined(MBEDTLS_PLATFORM_C) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index bbfbfbc1c..cafb81cca 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -228,6 +228,14 @@ check_tools() done } +check_headers_in_cpp () { + ls include/mbedtls >headers.txt + '