From df9b93e768d8fad000c1a2fa342eaa2735d00216 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Sun, 14 May 2017 16:17:33 +0300 Subject: [PATCH 1/4] Remove unneeded namesapcing in header files Remove the `mbedtls` namesapcing in the `#include` in header files Resolves issue #857 --- ChangeLog | 6 ++++++ configs/config-ccm-psk-tls1_2.h | 2 +- configs/config-mini-tls1_1.h | 2 +- configs/config-suite-b.h | 2 +- configs/config-thread.h | 2 +- include/mbedtls/cmac.h | 2 +- include/mbedtls/config.h | 2 +- include/mbedtls/ctr_drbg.h | 2 +- include/mbedtls/hmac_drbg.h | 2 +- include/mbedtls/net.h | 4 ++-- include/mbedtls/platform.h | 2 +- include/mbedtls/ssl.h | 2 +- 12 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index be0026e2b..7c0a67822 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ mbed TLS ChangeLog (Sorted per branch, date) += mbed TLS x.x.x branch released xxxx-xx-xx + +Bugfix + * Fix namespacing in header files. REmove the `mbedtls` namespacing in + the `#include` in the header files. Resolves #857 + = mbed TLS 2.7.4 branch released 2018-06-18 Bugfix diff --git a/configs/config-ccm-psk-tls1_2.h b/configs/config-ccm-psk-tls1_2.h index a783e6b73..96515a276 100644 --- a/configs/config-ccm-psk-tls1_2.h +++ b/configs/config-ccm-psk-tls1_2.h @@ -83,6 +83,6 @@ */ #define MBEDTLS_SSL_MAX_CONTENT_LEN 512 -#include "mbedtls/check_config.h" +#include "check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-mini-tls1_1.h b/configs/config-mini-tls1_1.h index 013bc0300..a14fc10b4 100644 --- a/configs/config-mini-tls1_1.h +++ b/configs/config-mini-tls1_1.h @@ -73,6 +73,6 @@ /* For testing with compat.sh */ #define MBEDTLS_FS_IO -#include "mbedtls/check_config.h" +#include "check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-suite-b.h b/configs/config-suite-b.h index 18e2c4036..23b53d612 100644 --- a/configs/config-suite-b.h +++ b/configs/config-suite-b.h @@ -112,6 +112,6 @@ */ #define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 -#include "mbedtls/check_config.h" +#include "check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-thread.h b/configs/config-thread.h index 25db16bf0..7c4311333 100644 --- a/configs/config-thread.h +++ b/configs/config-thread.h @@ -89,6 +89,6 @@ /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 -#include "mbedtls/check_config.h" +#include "check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/include/mbedtls/cmac.h b/include/mbedtls/cmac.h index 628c9daba..24839a20e 100644 --- a/include/mbedtls/cmac.h +++ b/include/mbedtls/cmac.h @@ -26,7 +26,7 @@ #ifndef MBEDTLS_CMAC_H #define MBEDTLS_CMAC_H -#include "mbedtls/cipher.h" +#include "cipher.h" #ifdef __cplusplus extern "C" { diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index c7ba1743b..8aee63f17 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -2818,7 +2818,7 @@ /* \} name SECTION: Customisation configuration options */ /* Target and application specific configurations */ -//#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "mbedtls/target_config.h" +//#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "target_config.h" #if defined(TARGET_LIKE_MBED) && defined(YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE) #include YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE diff --git a/include/mbedtls/ctr_drbg.h b/include/mbedtls/ctr_drbg.h index 121575a51..e554a0aff 100644 --- a/include/mbedtls/ctr_drbg.h +++ b/include/mbedtls/ctr_drbg.h @@ -31,7 +31,7 @@ #include "aes.h" #if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" +#include "threading.h" #endif #define MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */ diff --git a/include/mbedtls/hmac_drbg.h b/include/mbedtls/hmac_drbg.h index e0821cf78..2608de859 100644 --- a/include/mbedtls/hmac_drbg.h +++ b/include/mbedtls/hmac_drbg.h @@ -27,7 +27,7 @@ #include "md.h" #if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" +#include "threading.h" #endif /* diff --git a/include/mbedtls/net.h b/include/mbedtls/net.h index 28ae8217c..6c13b53fb 100644 --- a/include/mbedtls/net.h +++ b/include/mbedtls/net.h @@ -1,7 +1,7 @@ /** * \file net.h * - * \brief Deprecated header file that includes mbedtls/net_sockets.h + * \brief Deprecated header file that includes net_sockets.h * * \deprecated Superseded by mbedtls/net_sockets.h */ @@ -25,7 +25,7 @@ */ #if !defined(MBEDTLS_DEPRECATED_REMOVED) -#include "mbedtls/net_sockets.h" +#include "net_sockets.h" #if defined(MBEDTLS_DEPRECATED_WARNING) #warning "Deprecated header file: Superseded by mbedtls/net_sockets.h" #endif /* MBEDTLS_DEPRECATED_WARNING */ diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h index 2e21f0338..7c2835b30 100644 --- a/include/mbedtls/platform.h +++ b/include/mbedtls/platform.h @@ -31,7 +31,7 @@ #endif #if defined(MBEDTLS_HAVE_TIME) -#include "mbedtls/platform_time.h" +#include "platform_time.h" #endif #ifdef __cplusplus diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 42e0dcbc6..f424331c9 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -53,7 +53,7 @@ #endif #if defined(MBEDTLS_HAVE_TIME) -#include "mbedtls/platform_time.h" +#include "platform_time.h" #endif /* From 612a60018648fc4ee6d94e241a757c50d53e4ff1 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Sun, 1 Oct 2017 17:11:54 +0300 Subject: [PATCH 2/4] Fix typo in ChangeLog Fix typo in ChangeLog discovered in PR review --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7c0a67822..a5adf5ec7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ mbed TLS ChangeLog (Sorted per branch, date) = mbed TLS x.x.x branch released xxxx-xx-xx Bugfix - * Fix namespacing in header files. REmove the `mbedtls` namespacing in + * Fix namespacing in header files. Remove the `mbedtls` namespacing in the `#include` in the header files. Resolves #857 = mbed TLS 2.7.4 branch released 2018-06-18 From 47c8fce396896acc23aef3c237e9c0c8b55fe4b1 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Sun, 1 Jul 2018 10:42:54 +0300 Subject: [PATCH 3/4] Revert changes in the configs folder Revert the changes in the `configs` folder to align with the `README.txt` file. --- configs/config-ccm-psk-tls1_2.h | 2 +- configs/config-mini-tls1_1.h | 2 +- configs/config-no-entropy.h | 2 +- configs/config-suite-b.h | 2 +- configs/config-thread.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/config-ccm-psk-tls1_2.h b/configs/config-ccm-psk-tls1_2.h index 96515a276..a783e6b73 100644 --- a/configs/config-ccm-psk-tls1_2.h +++ b/configs/config-ccm-psk-tls1_2.h @@ -83,6 +83,6 @@ */ #define MBEDTLS_SSL_MAX_CONTENT_LEN 512 -#include "check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-mini-tls1_1.h b/configs/config-mini-tls1_1.h index a14fc10b4..013bc0300 100644 --- a/configs/config-mini-tls1_1.h +++ b/configs/config-mini-tls1_1.h @@ -73,6 +73,6 @@ /* For testing with compat.sh */ #define MBEDTLS_FS_IO -#include "check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-no-entropy.h b/configs/config-no-entropy.h index b4a0930b9..68cde30b6 100644 --- a/configs/config-no-entropy.h +++ b/configs/config-no-entropy.h @@ -86,6 +86,6 @@ /* Miscellaneous options */ #define MBEDTLS_AES_ROM_TABLES -#include "check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-suite-b.h b/configs/config-suite-b.h index 23b53d612..18e2c4036 100644 --- a/configs/config-suite-b.h +++ b/configs/config-suite-b.h @@ -112,6 +112,6 @@ */ #define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 -#include "check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/configs/config-thread.h b/configs/config-thread.h index 7c4311333..25db16bf0 100644 --- a/configs/config-thread.h +++ b/configs/config-thread.h @@ -89,6 +89,6 @@ /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 -#include "check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ From 0f9a5f1ae5d74f4901c0d6af317e0913ba9cedff Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Tue, 3 Jul 2018 16:07:29 +0300 Subject: [PATCH 4/4] Remove the namespacing from config-no-entropy.h Remove the `mbedtls` namespacing from the `config-no-entropy.h` file, as it is being imported to the include folder. --- configs/config-no-entropy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/config-no-entropy.h b/configs/config-no-entropy.h index 68cde30b6..b4a0930b9 100644 --- a/configs/config-no-entropy.h +++ b/configs/config-no-entropy.h @@ -86,6 +86,6 @@ /* Miscellaneous options */ #define MBEDTLS_AES_ROM_TABLES -#include "mbedtls/check_config.h" +#include "check_config.h" #endif /* MBEDTLS_CONFIG_H */