-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[3.6] Fix build C++ apps with MSVC #10200
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
base: mbedtls-3.6
Are you sure you want to change the base?
Conversation
Oops. I missed the signing-off part. That means commits must be done by actual team members and not external contributors? How can this proceed? |
@aslze Thanks for the contribution. You need to add a sign-off line to every commit message, to convey that you are allowed to make this contribution and that you allow us to use it as described in Practically, you can run |
e6b9b9f
to
11ded46
Compare
In crypto_extra.h, move PAKE size calculation macros, the definition of psa_pake_cipher_suite_s and psa_pake_operation_s just after PAKE type and values definitions. This aligns with the order of crypto header inclusions in crypto.h: crypto_types.h, then crypto_values.h, then crypto_sizes.h, and then crypto_struct.h. Take care of keeping them outside of the pake Doxygen group as they used to be. Signed-off-by: Ronald Cron <[email protected]>
As the definition of psa_pake_operation_s has been moved the "xyt_t" structure types can not be used anymore (defined later). Signed-off-by: Ronald Cron <[email protected]>
@aslze thanks for this pull request. Revisiting the changes in crypto_extra.h in this LTS context, I think we should do better actually in terms of not changing the Doxygen documentation and aligning with the re-organization done in crypto.h (#10196). |
I'll check later today. I don't understand the reference to Doxygen. IIRC, the idea of the commit was to move the definition of some structs up in the file. Struct names are the same, I think. |
@ronald-cron-arm yes, those two commits fix the issue, thanks. Would you add this commit from my PR? It's a tiny change. Fixes compilation of two test programs due to an apparent bug in a Windows header in C11 mode (as the compilation sets warnings as errors). |
Yes sure. Actually, would you mind updating this PR with the two last commits of https://github.com/ronald-cron-arm/mbedtls/tree/fix-crypto-extra-for-msvc-3.6 instead of 101b0e9 and address #10200 (comment)? Otherwise, if you prefer I can create a new PR based on https://github.com/ronald-cron-arm/mbedtls/tree/fix-crypto-extra-for-msvc-3.6 including your commit. |
f9e0b5a
to
6b08688
Compare
… winbase.h) Signed-off-by: Alvaro Segura <[email protected]>
Signed-off-by: Alvaro Segura <[email protected]>
6b08688
to
41422e1
Compare
@aslze Thanks for the update. I've just undone the squash in the last commit to three commits. That's better for the git history and that should help for the reviews. And I've started a run of CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Can someone please take a look. The system is complaining about API changes in the naming of some structs:
But I thought that was intentional and the |
Yes to me this is a false positive of our API/ABI checker script. |
@@ -1,4 +1,5 @@ | |||
/** | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker but I think this whitespace is accidental
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, it is an incremental build-up ofMbed-TLS/TF-PSA-Crypto#258 following #10196.
The abi check is a false positive and the mangling of the function signature will not be affected if we refer ot it by struct or by typedef alias, when building with C/C++.
Description
This fixes Bug #7087 in the 3.6 branch (unable to build C++ apps that use mbedTLS on MSVC 2019 Windows).
Ports the main commit in TF-PSA-Crypto#258, changing
crypto_extra.h
.Also fixes building a couple test programs inside mbedtls due to a warning in winbase.h in C11 mode.
PR checklist
Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.