From e2191cd789193ef33e87a7f75af0cdc54eddf14d Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 19 Feb 2021 16:04:15 +0000 Subject: [PATCH] Update includes to use library/ instead of include/mbedtls/ Simple find and replace using `#include (<|")mbedtls/(.*)_internal.h(>|")` and `#include $1$2_internal.h$3`. Also re-generated visualc files by running `scripts/generate_visualc_files.pl`. Signed-off-by: Chris Jones --- library/cipher.c | 2 +- library/cipher_wrap.c | 2 +- library/ecp.c | 2 +- library/md.c | 2 +- library/pk.c | 2 +- library/pk_wrap.c | 2 +- library/psa_crypto.c | 4 ++-- library/ssl_cache.c | 2 +- library/ssl_cli.c | 2 +- library/ssl_cookie.c | 2 +- library/ssl_msg.c | 2 +- library/ssl_srv.c | 2 +- library/ssl_ticket.c | 2 +- library/ssl_tls.c | 2 +- library/ssl_tls13_keys.c | 2 +- programs/ssl/ssl_context_info.c | 2 +- programs/test/cpp_dummy_build.cpp | 10 +++++----- programs/test/query_config.c | 2 +- scripts/data_files/query_config.fmt | 2 +- tests/suites/test_suite_hkdf.function | 2 +- tests/suites/test_suite_ssl.function | 2 +- visualc/VS2010/mbedTLS.vcxproj | 10 +++++----- 22 files changed, 31 insertions(+), 31 deletions(-) diff --git a/library/cipher.c b/library/cipher.c index 457f8f660..8d5bff665 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -26,7 +26,7 @@ #if defined(MBEDTLS_CIPHER_C) #include "mbedtls/cipher.h" -#include "mbedtls/cipher_internal.h" +#include "cipher_internal.h" #include "mbedtls/platform_util.h" #include "mbedtls/error.h" diff --git a/library/cipher_wrap.c b/library/cipher_wrap.c index 57eb3cb67..35bd76f3e 100644 --- a/library/cipher_wrap.c +++ b/library/cipher_wrap.c @@ -25,7 +25,7 @@ #if defined(MBEDTLS_CIPHER_C) -#include "mbedtls/cipher_internal.h" +#include "cipher_internal.h" #include "mbedtls/error.h" #if defined(MBEDTLS_CHACHAPOLY_C) diff --git a/library/ecp.c b/library/ecp.c index 05a0b0175..ac17ff164 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -97,7 +97,7 @@ #define mbedtls_free free #endif -#include "mbedtls/ecp_internal.h" +#include "ecp_internal.h" #if !defined(MBEDTLS_ECP_NO_INTERNAL_RNG) #if defined(MBEDTLS_HMAC_DRBG_C) diff --git a/library/md.c b/library/md.c index de77b164b..6553393f8 100644 --- a/library/md.c +++ b/library/md.c @@ -26,7 +26,7 @@ #if defined(MBEDTLS_MD_C) #include "mbedtls/md.h" -#include "mbedtls/md_internal.h" +#include "md_internal.h" #include "mbedtls/platform_util.h" #include "mbedtls/error.h" diff --git a/library/pk.c b/library/pk.c index ecf002d45..3824e7912 100644 --- a/library/pk.c +++ b/library/pk.c @@ -21,7 +21,7 @@ #if defined(MBEDTLS_PK_C) #include "mbedtls/pk.h" -#include "mbedtls/pk_internal.h" +#include "pk_internal.h" #include "mbedtls/platform_util.h" #include "mbedtls/error.h" diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 107e912ac..74d7ce16c 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -20,7 +20,7 @@ #include "common.h" #if defined(MBEDTLS_PK_C) -#include "mbedtls/pk_internal.h" +#include "pk_internal.h" #include "mbedtls/error.h" /* Even if RSA not activated, for the sake of RSA-alt */ diff --git a/library/psa_crypto.c b/library/psa_crypto.c index b7c459166..2213657ff 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -73,9 +73,9 @@ #include "mbedtls/md4.h" #include "mbedtls/md5.h" #include "mbedtls/md.h" -#include "mbedtls/md_internal.h" +#include "md_internal.h" #include "mbedtls/pk.h" -#include "mbedtls/pk_internal.h" +#include "pk_internal.h" #include "mbedtls/platform_util.h" #include "mbedtls/error.h" #include "mbedtls/ripemd160.h" diff --git a/library/ssl_cache.c b/library/ssl_cache.c index 7e9d4da05..141c480df 100644 --- a/library/ssl_cache.c +++ b/library/ssl_cache.c @@ -34,7 +34,7 @@ #endif #include "mbedtls/ssl_cache.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include diff --git a/library/ssl_cli.c b/library/ssl_cli.c index a8331d9bb..27e02469a 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -30,7 +30,7 @@ #endif #include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/debug.h" #include "mbedtls/error.h" diff --git a/library/ssl_cookie.c b/library/ssl_cookie.c index c8bd1bd52..0824cd909 100644 --- a/library/ssl_cookie.c +++ b/library/ssl_cookie.c @@ -33,7 +33,7 @@ #endif #include "mbedtls/ssl_cookie.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/error.h" #include "mbedtls/platform_util.h" diff --git a/library/ssl_msg.c b/library/ssl_msg.c index 72f09bb42..06da868aa 100644 --- a/library/ssl_msg.c +++ b/library/ssl_msg.c @@ -39,7 +39,7 @@ #endif #include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/debug.h" #include "mbedtls/error.h" #include "mbedtls/platform_util.h" diff --git a/library/ssl_srv.c b/library/ssl_srv.c index e33b828ad..9385d4f77 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -30,7 +30,7 @@ #endif #include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/debug.h" #include "mbedtls/error.h" #include "mbedtls/platform_util.h" diff --git a/library/ssl_ticket.c b/library/ssl_ticket.c index 626d137cc..cd1ea7e58 100644 --- a/library/ssl_ticket.c +++ b/library/ssl_ticket.c @@ -29,7 +29,7 @@ #define mbedtls_free free #endif -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/ssl_ticket.h" #include "mbedtls/error.h" #include "mbedtls/platform_util.h" diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 336cbea37..659ef6b9c 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -38,7 +38,7 @@ #endif #include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/debug.h" #include "mbedtls/error.h" #include "mbedtls/platform_util.h" diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c index c39e0322b..f197c05c8 100644 --- a/library/ssl_tls13_keys.c +++ b/library/ssl_tls13_keys.c @@ -22,7 +22,7 @@ #if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL) #include "mbedtls/hkdf.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "ssl_tls13_keys.h" #include diff --git a/programs/ssl/ssl_context_info.c b/programs/ssl/ssl_context_info.c index a204d9ead..868951b60 100644 --- a/programs/ssl/ssl_context_info.c +++ b/programs/ssl/ssl_context_info.c @@ -48,7 +48,7 @@ int main( void ) #include "mbedtls/error.h" #include "mbedtls/base64.h" #include "mbedtls/md.h" -#include "mbedtls/md_internal.h" +#include "../../library/md_internal.h" #include "mbedtls/x509_crt.h" #include "mbedtls/ssl_ciphersuites.h" diff --git a/programs/test/cpp_dummy_build.cpp b/programs/test/cpp_dummy_build.cpp index 75714cfa6..41617c2d0 100644 --- a/programs/test/cpp_dummy_build.cpp +++ b/programs/test/cpp_dummy_build.cpp @@ -41,7 +41,7 @@ #include "mbedtls/chachapoly.h" #include "mbedtls/check_config.h" #include "mbedtls/cipher.h" -#include "mbedtls/cipher_internal.h" +#include "cipher_internal.h" #include "mbedtls/cmac.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/debug.h" @@ -51,7 +51,7 @@ #include "mbedtls/ecdsa.h" #include "mbedtls/ecjpake.h" #include "mbedtls/ecp.h" -#include "mbedtls/ecp_internal.h" +#include "ecp_internal.h" #include "mbedtls/entropy.h" #include "mbedtls/entropy_poll.h" #include "mbedtls/error.h" @@ -62,7 +62,7 @@ #include "mbedtls/md2.h" #include "mbedtls/md4.h" #include "mbedtls/md5.h" -#include "mbedtls/md_internal.h" +#include "md_internal.h" #include "mbedtls/net.h" #include "mbedtls/net_sockets.h" #include "mbedtls/nist_kw.h" @@ -70,7 +70,7 @@ #include "mbedtls/padlock.h" #include "mbedtls/pem.h" #include "mbedtls/pk.h" -#include "mbedtls/pk_internal.h" +#include "pk_internal.h" #include "mbedtls/pkcs11.h" #include "mbedtls/pkcs12.h" #include "mbedtls/pkcs5.h" @@ -88,7 +88,7 @@ #include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_ciphersuites.h" #include "mbedtls/ssl_cookie.h" -#include "mbedtls/ssl_internal.h" +#include "ssl_internal.h" #include "mbedtls/ssl_ticket.h" #include "mbedtls/threading.h" #include "mbedtls/timing.h" diff --git a/programs/test/query_config.c b/programs/test/query_config.c index bc8389fd0..0bb6c1c44 100644 --- a/programs/test/query_config.c +++ b/programs/test/query_config.c @@ -92,7 +92,6 @@ #include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_ciphersuites.h" #include "mbedtls/ssl_cookie.h" -#include "mbedtls/ssl_internal.h" #include "mbedtls/ssl_ticket.h" #include "mbedtls/threading.h" #include "mbedtls/timing.h" @@ -102,6 +101,7 @@ #include "mbedtls/x509_crt.h" #include "mbedtls/x509_csr.h" #include "mbedtls/xtea.h" +#include "../../library/ssl_internal.h" #include diff --git a/scripts/data_files/query_config.fmt b/scripts/data_files/query_config.fmt index 97020904f..eff225e8a 100644 --- a/scripts/data_files/query_config.fmt +++ b/scripts/data_files/query_config.fmt @@ -92,7 +92,6 @@ #include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_ciphersuites.h" #include "mbedtls/ssl_cookie.h" -#include "mbedtls/ssl_internal.h" #include "mbedtls/ssl_ticket.h" #include "mbedtls/threading.h" #include "mbedtls/timing.h" @@ -102,6 +101,7 @@ #include "mbedtls/x509_crt.h" #include "mbedtls/x509_csr.h" #include "mbedtls/xtea.h" +#include "../../library/ssl_internal.h" #include diff --git a/tests/suites/test_suite_hkdf.function b/tests/suites/test_suite_hkdf.function index 4c597c3f9..174d6accf 100644 --- a/tests/suites/test_suite_hkdf.function +++ b/tests/suites/test_suite_hkdf.function @@ -1,6 +1,6 @@ /* BEGIN_HEADER */ #include "mbedtls/hkdf.h" -#include "mbedtls/md_internal.h" +#include "md_internal.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index f377ffa99..bd282774a 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -1,6 +1,6 @@ /* BEGIN_HEADER */ #include -#include +#include #include #include #include diff --git a/visualc/VS2010/mbedTLS.vcxproj b/visualc/VS2010/mbedTLS.vcxproj index 004d83b18..0e2c060af 100644 --- a/visualc/VS2010/mbedTLS.vcxproj +++ b/visualc/VS2010/mbedTLS.vcxproj @@ -158,7 +158,6 @@ - @@ -170,7 +169,6 @@ - @@ -181,7 +179,6 @@ - @@ -190,7 +187,6 @@ - @@ -208,7 +204,6 @@ - @@ -241,7 +236,11 @@ + + + + @@ -252,6 +251,7 @@ +