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

Comments

Projects
None yet
4 participants
@vakatov

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.)

@sbutcher-arm

This comment has been minimized.

Collaborator

sbutcher-arm commented Mar 24, 2017

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

This comment has been minimized.

Member

ciarmcom commented Mar 24, 2017

ARM Internal Ref: IOTSSL-1301

@ciarmcom ciarmcom added the mirrored label Mar 24, 2017

RonEld added a commit to RonEld/mbedtls that referenced this issue May 14, 2017

Remove unneeded namesapcing in header files
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue ARMmbed#857

RonEld added a commit to RonEld/mbedtls that referenced this issue Jun 24, 2018

Remove unneeded namesapcing in header files
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue ARMmbed#857

RonEld added a commit to RonEld/mbedtls that referenced this issue Jun 24, 2018

Remove unneeded namesapcing in header files
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue ARMmbed#857

RonEld added a commit to RonEld/mbedtls that referenced this issue Jun 24, 2018

Remove unneeded namesapcing in header files
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue ARMmbed#857
@vakatov

This comment has been minimized.

vakatov commented Jul 20, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment