mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 21:04:06 +00:00
wininet: Don't call SSL_connect until initialization is complete.
This commit is contained in:
parent
181a367a1f
commit
98dbdadcda
1 changed files with 8 additions and 8 deletions
|
@ -671,14 +671,6 @@ DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (pSSL_connect(connection->ssl_s) <= 0)
|
||||
{
|
||||
res = (DWORD_PTR)pSSL_get_ex_data(connection->ssl_s, error_idx);
|
||||
if (!res)
|
||||
res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR;
|
||||
ERR("SSL_connect failed: %d\n", res);
|
||||
goto fail;
|
||||
}
|
||||
if (!pSSL_set_ex_data(connection->ssl_s, hostname_idx, hostname))
|
||||
{
|
||||
ERR("SSL_set_ex_data failed: %s\n",
|
||||
|
@ -693,6 +685,14 @@ DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname)
|
|||
res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR;
|
||||
goto fail;
|
||||
}
|
||||
if (pSSL_connect(connection->ssl_s) <= 0)
|
||||
{
|
||||
res = (DWORD_PTR)pSSL_get_ex_data(connection->ssl_s, error_idx);
|
||||
if (!res)
|
||||
res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR;
|
||||
ERR("SSL_connect failed: %d\n", res);
|
||||
goto fail;
|
||||
}
|
||||
verify_res = pSSL_get_verify_result(connection->ssl_s);
|
||||
if (verify_res != X509_V_OK)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue