We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d47af8 commit c27f5a9Copy full SHA for c27f5a9
1 file changed
ixwebsocket/IXSocketMbedTLS.cpp
@@ -47,12 +47,13 @@ namespace ix
47
mbedtls_x509_crt_init(&_cacert);
48
mbedtls_x509_crt_init(&_cert);
49
mbedtls_pk_init(&_pkey);
50
- // Initialize the PSA Crypto API if requested.
+ // Initialize the PSA Crypto API if required by the version of Mbed TLS (3.6.0).
51
// This allows the X.509/TLS libraries to use PSA for crypto operations.
52
// See: https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md
53
- #if defined(IXWEBSOCKET_MBEDTLS_USE_PSA_CRYPTO)
54
- psa_crypto_init();
55
- #endif
+ if (MBEDTLS_VERSION_MAJOR >= 3 && MBEDTLS_VERSION_MINOR >= 6 && MBEDTLS_VERSION_PATCH >= 0)
+ {
+ psa_crypto_init();
56
+ }
57
}
58
59
bool SocketMbedTLS::loadSystemCertificates(std::string& errorMsg)
0 commit comments