mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(mbedtls): link esp-cryptoauthlib to mbedcrypto library
If the certificate bundle feature is disabled then the mbedtls component library becomes interface only component and hence adding esp-cryptoauthlib as its PRIVATE dependency does not work. Instead the esp-cryptoauthlib should be added as PRIVATE dependency for mbedcrypto library (for alternate ECDSA implementation).
This commit is contained in:
parent
f477682938
commit
a2de1ca576
@ -333,7 +333,16 @@ if(CONFIG_ESP_TLS_USE_DS_PERIPHERAL)
|
||||
set_property(TARGET mbedcrypto APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 6)
|
||||
endif()
|
||||
|
||||
# Link esp-cryptoauthlib to mbedtls
|
||||
# Additional optional dependencies for the mbedcrypto library
|
||||
function(mbedcrypto_optional_deps component_name)
|
||||
idf_build_get_property(components BUILD_COMPONENTS)
|
||||
if(${component_name} IN_LIST components)
|
||||
idf_component_get_property(lib_name ${component_name} COMPONENT_LIB)
|
||||
target_link_libraries(mbedcrypto PRIVATE ${lib_name})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Link esp-cryptoauthlib to mbedcrypto
|
||||
if(CONFIG_ATCA_MBEDTLS_ECDSA)
|
||||
idf_component_optional_requires(PRIVATE espressif__esp-cryptoauthlib esp-cryptoauthlib)
|
||||
mbedcrypto_optional_deps(espressif__esp-cryptoauthlib esp-cryptoauthlib)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user