(websocket+tls) fix hang in tls handshake which could lead to ANR, discovered through unittesting.

This commit is contained in:
Benjamin Sergeant
2020-03-20 16:57:27 -07:00
parent 829751b7af
commit 1d6373335c
8 changed files with 58 additions and 19 deletions

View File

@ -39,7 +39,9 @@ namespace ix
void openSSLInitialize();
std::string getSSLError(int ret);
SSL_CTX* openSSLCreateContext(std::string& errMsg);
bool openSSLClientHandshake(const std::string& hostname, std::string& errMsg);
bool openSSLClientHandshake(const std::string& hostname,
std::string& errMsg,
const CancellationRequest& isCancellationRequested);
bool openSSLCheckServerCert(SSL* ssl, const std::string& hostname, std::string& errMsg);
bool checkHost(const std::string& host, const char* pattern);
bool handleTLSOptions(std::string& errMsg);