From 851157f2521366d93218e99ddcd65fb2b0922943 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Fri, 22 Oct 2021 10:59:51 -0700 Subject: [PATCH] update api call --- ixwebsocket/IXSocketMbedTLS.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ixwebsocket/IXSocketMbedTLS.cpp b/ixwebsocket/IXSocketMbedTLS.cpp index 85ff16fe..01f8c870 100644 --- a/ixwebsocket/IXSocketMbedTLS.cpp +++ b/ixwebsocket/IXSocketMbedTLS.cpp @@ -132,7 +132,11 @@ namespace ix errMsg = "Cannot parse cert file '" + _tlsOptions.certFile + "'"; return false; } +#ifdef IXWEBSOCKET_USE_MBED_TLS_MIN_VERSION_3 + if (mbedtls_pk_parse_keyfile(&_pkey, _tlsOptions.keyFile.c_str(), "", mbedtls_ctr_drbg_random, &_ctr_drbg) < 0) +#else if (mbedtls_pk_parse_keyfile(&_pkey, _tlsOptions.keyFile.c_str(), "") < 0) +#endif { errMsg = "Cannot parse key file '" + _tlsOptions.keyFile + "'"; return false;