-
Notifications
You must be signed in to change notification settings - Fork 3k
Update to mbedtls 2.18.0rc3 #10802
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
Update to mbedtls 2.18.0rc3 #10802
Conversation
@Patater, thank you for your changes. |
Let's focus on this one. I've initially thought these 2 PRs are separate (was wondering why). I'll review and CI this one rather |
what rc3 and rc4 are fixing, to get these details I need to go to mbedtls ? |
Ci started |
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.
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.
Approved for rc3
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Please wait for crypto team review before merge. |
@Patater I would like to generate RC3 this afternoon so any chance we can prioritise this review (if not already happening) ? |
When using Mbed Crypto's PSA Entropy Injection feature on Mbed OS, it is not required to opt out of having entropy sources added to your entropy contexts by default (via MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES). As integrated in Mbed OS, MBEDTLS_PSA_INJECT_ENTROPY is compatible with actual entropy sources. PSA entropy injection is implemented using the standard Mbed TLS NV Seed feature, and is as compatible with other entropy sources as the standard Mbed TLS NV Seed feature which does support entropy mixing.
7419c3d
to
1470d06
Compare
Force pushed to remove rc4 version tag, as this version does not exist. The changes made to allow PSA entropy to be compatible with other entropy sources are Mbed OS only changes. |
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
CI started |
This brings in dozens of warnings for PSA related macro redefinitions. Testing with mbed-os-example-blinky, GCC and K64F.
|
I believe that's a pre-existing issue, tracked by internal reference https://jira.arm.com/browse/IOTCRYPT-783 |
@TeroJaasko I've added a commit to eliminate the warnings. Would be nice to have Mbed OS build with |
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Test failure could be from the previous run |
Yes, failures are from run 2. Run 3 is currently ongoing. The run 2 failures appear to be assertion failures during filesystem tests on K66F. Have we seen that before?
|
We get a few 'random' ci failures due to boards in a bad state etc, so it may have been seen previously. Probably not something to worry about if run 3 passes ok. |
Test run: FAILEDSummary: 3 of 7 test jobs failed Failed test jobs:
|
Test failed above but then CI posted build failures (nothing in the logs, not on VPN to verify the hooks). Restart? |
Test run: FAILEDSummary: 3 of 7 test jobs failed Failed test jobs:
|
02ac141
to
e61e92c
Compare
Updated to to fix its test failures hopefully. Re-added the definition of MBEDTLS_PSA_CRYPTO_C for PSA SPE targets as it appears that some files (not sure which yet) used by PSA SPE targets are not including the mbedtls/config.h as they should. |
CI restarted |
@Patater looks like a couple more valid failures |
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 but I didn't review the configuration changes on each platform individually.
Mbed TLS now enables PSA APIs by default on all targets. It's not necessary to explicitly enable MBEDTLS_PSA_CRYPTO_C, as that can be gotten from the Mbed TLS config.h. However, many PSA targets depend on `-DMBEDTLS_PSA_CRYPTO_C` being defined by the Mbed OS json configuration system and are not yet properly including the Mbed TLS configuration; for these PSA targets, warnings may remain until this issue is fixed. Avoiding re-definition will eliminate warnings like the following, when building mbed-os-example-blinky: Compile [ 14.5%]: pal_client_api_empty_intf.c [Warning] pal_client_api_intf.h@35,0: "PSA_SUCCESS" redefined Compile [ 14.6%]: pal_client_api_intf.c Compile [ 14.7%]: DeviceKey.cpp Compile [ 14.9%]: pal_internal_trusted_storage_intf.c [Warning] pal_internal_trusted_storage_intf.c@45,9: 'psa_its_set' is deprecated: PS specific types should not be used [-Wdeprecated-declarations] Compile [ 15.3%]: val_attestation.c [Warning] client.h@40,0: "PSA_VERSION_NONE" redefined <..> Compile [ 33.3%]: asn1parse.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.5%]: aes.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.6%]: asn1write.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.7%]: psa_crypto.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.8%]: blowfish.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.9%]: camellia.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.0%]: base64.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.2%]: ccm.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.3%]: chacha20.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.4%]: chachapoly.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.5%]: cipher_wrap.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.6%]: cmac.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.7%]: cipher.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.9%]: bignum.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 35.0%]: des.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 35.1%]: dhm.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 35.2%]: ctr_drbg.c <..> Compile [ 70.9%]: EthernetInterface.cpp [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 71.0%]: InternetSocket.cpp Compile [ 71.1%]: L3IPInterface.cpp [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 71.2%]: NetworkInterface.cpp
e61e92c
to
39ea40f
Compare
Updated to re-add MBEDTLS_PSA_CRYPTO_C via targets.json, as many PSA targets, both SPE and NSPE, are depending on |
Ci started |
Test run: FAILEDSummary: 4 of 7 test jobs failed Failed test jobs:
|
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Update Mbed TLS to 2.18.0 rc3 and make Mbed OS specific modifications to allow all Mbed TLS DRBGs to use Mbed Crypto's PSA Entropy Injection feature.
Fixes #10787
Fixes #10788
Pull request type
Reviewers
@teetak01
CC @JanneKiiskila