[2nd try] Update IXSocketMbedTLS.cpp (#137)

* Update IXSocketMbedTLS.cpp

fix initialization of mbedtls context.
without this, crashes under certain conditions.

* Update IXSocketMbedTLS.cpp

removed newline on 46
This commit is contained in:
James Tyra 2019-12-30 16:38:25 -06:00 committed by Benjamin Sergeant
parent d60777b9cc
commit 98e98f083e

View File

@ -39,6 +39,10 @@ namespace ix
mbedtls_entropy_init(&_entropy);
mbedtls_x509_crt_init(&_cacert);
mbedtls_x509_crt_init(&_cert);
mbedtls_pk_init(&_pkey);
// FIXME: This will only work for RSA Private keys, what about other types? (ECDSA for
// example)
mbedtls_pk_setup(&_pkey, mbedtls_pk_info_from_type(MBEDTLS_PK_RSA));
}
bool SocketMbedTLS::init(const std::string& host, bool isClient, std::string& errMsg)