Compilation issues with mbedtls_x509write_crt_set_key_identifier due to conditional dependency on MBEDTLS_MD_CAN_SHA1 #10096
Labels
api-break
This issue/PR breaks the API and must wait for a new major version
component-x509
enhancement
needs-design-approval
size-s
Estimated task size: small (~2d)
Description: Under the file modules/crypto/mbedtls/library/x509write_crt.c, the function mbedtls_x509write_crt_set_key_identifier is conditionally included based on the configuration MBEDTLS_MD_CAN_SHA1. When attempting to disable the vulnerable cipher MBEDTLS_MD_CAN_SHA1, I encountered compilation issues because I need to use the mbedtls_x509write_crt_set_key_identifier function to generate certificates.
Steps to Reproduce:
Disable the configuration MBEDTLS_MD_CAN_SHA1.
Attempt to compile the code that uses mbedtls_x509write_crt_set_key_identifier.
Expected Behavior: The code should compile successfully without requiring MBEDTLS_MD_CAN_SHA1.
Actual Behavior: Compilation fails due to the conditional dependency on MBEDTLS_MD_CAN_SHA1.
Questions:
Why is there a dependency on MBEDTLS_MD_CAN_SHA1 for the mbedtls_x509write_crt_set_key_identifier function?
How can this issue be resolved to allow the use of mbedtls_x509write_crt_set_key_identifier without enabling MBEDTLS_SHA1_C?
Additional Information:
Zephyr version: 3.6.0
MbedTLS version: 3.5.2
The text was updated successfully, but these errors were encountered: