Mbed-TLS / mbedtls

An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
https://www.trustedfirmware.org/projects/mbed-tls/
Other
5.21k stars 2.55k forks source link

ECP test suite fails to build if MBEDTLS_CHECK_PARAMS is defined but MBEDTLS_ECP_RESTARTABLE isn't #2329

Open hanno-becker opened 5 years ago

hanno-becker commented 5 years ago

Issue: If MBEDTLS_CHECK_PARAMS is defined but MBEDTLS_ECP_RESTARTABLE isn't, the ECP test suite compilation fails because of the declaration of a local variable of type mbedtls_ecp_restart_ctx which is defined as void in this case: https://github.com/ARMmbed/mbedtls/blob/fb1972db23da39bd11d4f9c9ea6266eee665605b/tests/suites/test_suite_ecp.function#L46

Tasks: Remove declaration if MBEDTLS_ECP_RESTARTABLE is unset (as restart_ctx isn't used in this case anyway), and add a test to all.sh which would have caught the issue.

ciarmcom commented 5 years ago

ARM Internal Ref: IOTSSL-2701