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

RSA tests fail with clang #1986

Open
d3zd3z opened this issue Jun 25, 2024 · 1 comment · May be fixed by #1987
Open

RSA tests fail with clang #1986

d3zd3z opened this issue Jun 25, 2024 · 1 comment · May be fixed by #1987
Assignees
Labels
area: sim Affects the simulator bug

Comments

@d3zd3z
Copy link
Member

d3zd3z commented Jun 25, 2024

When using clang to compile the simulator tests, the rsa tests fail.

$ CC=clang cargo test --features sig-rsa
...
test norevert ... FAILED
...

The pass if optimization is disabled in mcuboot-sys. I appears to be an issue with the mbed tls RSA code.

@d3zd3z d3zd3z self-assigned this Jun 25, 2024
@d3zd3z d3zd3z added bug area: sim Affects the simulator labels Jun 25, 2024
d3zd3z added a commit to d3zd3z/mcuboot that referenced this issue Jun 25, 2024
The in-tree mbedtls (used for the simulator and some targets) is a few years
old, and currently is unable to pass the rsa tests when built with clang.
Update this mbed TLS to the v3.5.2 release.  This fixes clang support in the
simulator.

Fixes mcu-tools#1986

Signed-off-by: David Brown <[email protected]>
@d3zd3z d3zd3z linked a pull request Jun 25, 2024 that will close this issue
@d3zd3z
Copy link
Member Author

d3zd3z commented Jun 26, 2024

So, this is a known bug with mbed TLS <= 3.0.0, and is fixed in 3.1.0. I'm working on a migration path to move mcuboot to the latest Mbed TLS.

d3zd3z added a commit to d3zd3z/mcuboot that referenced this issue Jun 27, 2024
The in-tree mbedtls (used for the simulator and some targets) is a few years
old, and currently is unable to pass the rsa tests when built with clang.
Update this mbed TLS to the v3.6.0 release.  This fixes clang support in the
simulator.

There are a few minor changes to configuration and what files are needed to
support newer version of Mbed TLS.

Fixes mcu-tools#1986

Signed-off-by: David Brown <[email protected]>
d3zd3z added a commit to d3zd3z/mcuboot that referenced this issue Jun 28, 2024
The in-tree mbedtls (used for the simulator and some targets) is a few years
old, and currently is unable to pass the rsa tests when built with clang.
Update this mbed TLS to the v3.6.0 release.  This fixes clang support in the
simulator.

There are a few minor changes to configuration and what files are needed to
support newer version of Mbed TLS.

Fixes mcu-tools#1986

Signed-off-by: David Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: sim Affects the simulator bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant