Fix MbedTLS usage bugs and allow cmake to use imported mbedtls library #1154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Fixes
examples/streamer/h264fileparser.cpp
replacedvector<byte>
tovector<std::byte>
to avoid ambiguitysrc/impl/tls.cpp
addedMBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET
as allowed return codes to support TLS1.3src/impl/tlstransport.cpp
added call topsa_crypto_init()
to allow PSA Cryptographic operations that are actually usedsrc/impl/verifiedtlstransport.cpp
functionmbedtls_x509_crt_parse
assumes that a certificate in PEM format contains tailing 0, so it should be counted when passing string size, changedcacert->size()
tocacert->size() + 1
Features
find_library
inCMake
always tries to find the library installed, but in the case when the same library was build from source as a CMake dependency, find_library would fail. To fix the issue,CMakeLists.txt
is changed to callfind_library
formbedtls
andsrtp2
only if related targets are not exist.