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

Fix MbedTLS usage bugs and allow cmake to use imported mbedtls library #1154

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

dmllr
Copy link
Contributor

@dmllr dmllr commented Apr 8, 2024

Changes

Fixes

  • in examples/streamer/h264fileparser.cpp replaced vector<byte> to vector<std::byte> to avoid ambiguity
  • in src/impl/tls.cpp added MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET as allowed return codes to support TLS1.3
  • in src/impl/tlstransport.cpp added call to psa_crypto_init() to allow PSA Cryptographic operations that are actually used
  • in src/impl/verifiedtlstransport.cpp function mbedtls_x509_crt_parse assumes that a certificate in PEM format contains tailing 0, so it should be counted when passing string size, changed cacert->size() to cacert->size() + 1

Features

find_library in CMake 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 call find_library for mbedtls and srtp2 only if related targets are not exist.

@dmllr dmllr changed the title allow cmake to use imported mbedtls library fix MbedTLS usage bugs and allow cmake to use imported mbedtls library Apr 11, 2024
Copy link
Owner

@paullouisageneau paullouisageneau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes!

@paullouisageneau paullouisageneau changed the title fix MbedTLS usage bugs and allow cmake to use imported mbedtls library Fix MbedTLS usage bugs and allow cmake to use imported mbedtls library Apr 11, 2024
@paullouisageneau paullouisageneau merged commit 5064b0b into paullouisageneau:master Apr 11, 2024
12 checks passed
paullouisageneau added a commit that referenced this pull request Apr 17, 2024
Fix MbedTLS usage bugs and allow cmake to use imported mbedtls library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants