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

Changing "common.h" to "mbedcrypto_common.h" to avoid file-name collisions #38

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

frkv
Copy link
Contributor

@frkv frkv commented Jan 22, 2025

Pulling in a [nrf fromlist] that removes issues of the wrong common.h being picked up when trying to build Zephyr with Mbed TLS/Oberon-psa-core

The relevant commit is the top one

[nrf noup] Move headers found in Oberon PSA core

The Oberon PSA core has some replacement headers but it also
uses headers from the library folder. Since the headers and the
C files in this folder perform inclusion with double quotes this
can create issues since the Oberon PSA core may use headrs from
this repo that it shouldn't.

This moves the headers that the Oberon PSA core replaces with
to another folder so that they don't accidentaly included from the
Oberon PSA core.

Note that mbedcrypto_common.h is not moved

Signed-off-by: Frank Audun Kvamtrø [email protected]

frkv added 2 commits January 22, 2025 14:05
-Reverted done because /library/common.h is used here
 but it is intended to be changed in a coming commit

This reverts commit 51a390f.

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
-Changing all instances of #include "common.h" to
 #include "mbedcrypto_common.h" to prevent collitions
-Changing the name of common.h to mbedcrypto_common.h
-Mbed TLS uses the file name "common.h" for common
 settings relevant for build. Unfortunately common.h
 is not guarded with any folder-structure as this
 is an internal file that is present in the folder
 where source-files resides. Due to the way that
 zephyr adds include-folders it will be difficult to
 prevent someone coming up with the same name and
 adding the include-folder earlier than Mbed TLS.

Note: This change will be proposed upstream in Mbed TLS
with the hope that this commit is can be reverted

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
(cherry picked from commit fcf3eac94f406fee639a4e456ece15b86c8669b2)
@frkv frkv requested a review from a team January 22, 2025 13:43
The Oberon PSA core has some replacement headers but it also
uses headers from the library folder. Since the headers and the
C files in this folder perform inclusion with double quotes this
can create issues since the Oberon PSA core may use headrs from
this repo that it shouldn't.

This moves the headers that the Oberon PSA core replaces with
to another folder so that they don't accidentaly included from the
Oberon PSA core.

Note that mbedcrypto_common.h is not moved

Signed-off-by: Georgios Vasilakis <[email protected]>
Signed-off-by: Frank Audun Kvamtrø <[email protected]>
@frkv frkv force-pushed the mbedcrypto_common branch from 9522f3e to 716eeea Compare January 22, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants