Skip to content

Commit

Permalink
Initialize the PSA Crypto API if requested (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
teejusb authored Apr 30, 2024
1 parent dc8807e commit 1d210c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ If your company or project is using this library, feel free to open an issue or
- [Abaddon](https://github.com/uowuo/abaddon), An alternative Discord client made with C++/gtkmm
- [NovaCoin](https://github.com/novacoin-project/novacoin), a hybrid scrypt PoW + PoS based cryptocurrency.
- [Candy](https://github.com/lanthora/candy), A WebSocket and TUN based VPN for Linux
- [ITGmania](https://github.com/itgmania/itgmania), a cross platform Dance Dance Revolution-like emulator.

## Alternative libraries

Expand Down
6 changes: 6 additions & 0 deletions ixwebsocket/IXSocketMbedTLS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ namespace ix
mbedtls_x509_crt_init(&_cacert);
mbedtls_x509_crt_init(&_cert);
mbedtls_pk_init(&_pkey);
// Initialize the PSA Crypto API if requested.
// This allows the X.509/TLS libraries to use PSA for crypto operations.
// See: https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md
#if defined(IXWEBSOCKET_MBEDTLS_USE_PSA_CRYPTO)
psa_crypto_init();
#endif
}

bool SocketMbedTLS::loadSystemCertificates(std::string& errorMsg)
Expand Down

0 comments on commit 1d210c0

Please sign in to comment.