Skip to content

Commit 3996dc7

Browse files
committed
Version check mbedtls instead of introducing a new define
1 parent 2d47af8 commit 3996dc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ixwebsocket/IXSocketMbedTLS.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ namespace ix
5050
// Initialize the PSA Crypto API if requested.
5151
// This allows the X.509/TLS libraries to use PSA for crypto operations.
5252
// 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
53+
if (MBEDTLS_VERSION_MAJOR >= 3 && MBEDTLS_VERSION_MINOR >= 6 && MBEDTLS_VERSION_PATCH >= 0)
54+
{
55+
psa_crypto_init();
56+
}
5657
}
5758

5859
bool SocketMbedTLS::loadSystemCertificates(std::string& errorMsg)

0 commit comments

Comments
 (0)