Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some headers #include other 'mbedTLS' headers as "mbedtls/*.h" rather than "*.h" #857

Closed
vakatov opened this issue Mar 23, 2017 · 3 comments
Labels

Comments

@vakatov
Copy link

vakatov commented Mar 23, 2017

Dear 'mbedTLS' developers,

While embedding 'mbedTLS' (ver 2.4.2) sources into our source tree we noticed that some headers include other mbedTLS headers as: #include "mbedtls/foo.h" (rather than just: #include "foo.h"). It happens but in just a handful of cases (listed below), everywhere else it uses a more manageable: #include "foo.h".

While it's no big deal it looks like an accidental oversight which makes 'mbedTLS' just a tad less a "drop-in"; and, it looks like an easy formal fix. -- Can you please take a look?

cmac.h:27:#include "mbedtls/cipher.h"
config.h:2589://#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "mbedtls/target_config.h"
ctr_drbg.h:29:#include "mbedtls/threading.h"
hmac_drbg.h:29:#include "mbedtls/threading.h"
net.h:27:#include "mbedtls/net_sockets.h"
platform.h:33:#include "mbedtls/platform_time.h"
ssl.h:55:#include "mbedtls/platform_time.h"

Thanks much for the great embeddable product!
(We have recently switched to it from GnuTLS which was much harder to manage due to a lot of 3rd-party DLL dependencies.)

@simonbutcher
Copy link
Contributor

Thanks for the feedback.

To be clear to anyone reading this bug - the use of mbedtls\*.h is a deliberate namespacing technique when including headers in the .c files, and is used throughout the library. The issue here, is that including headers within headers, doesn't need this namespacing - and is a mistake.

@ciarmcom
Copy link

ARM Internal Ref: IOTSSL-1301

RonEld pushed a commit to RonEld/mbedtls that referenced this issue May 14, 2017
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue Mbed-TLS#857
RonEld pushed a commit to RonEld/mbedtls that referenced this issue Jun 24, 2018
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue Mbed-TLS#857
RonEld pushed a commit to RonEld/mbedtls that referenced this issue Jun 24, 2018
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue Mbed-TLS#857
RonEld pushed a commit to RonEld/mbedtls that referenced this issue Jun 24, 2018
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue Mbed-TLS#857
@vakatov
Copy link
Author

vakatov commented Jul 20, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants