wininet: Fixed HTTP CONNECT secure connection.
This commit is contained in:
parent
c8da35729c
commit
bd42c0416a
|
@ -4743,7 +4743,7 @@ static DWORD open_http_connection(http_request_t *request, BOOL *reusing)
|
|||
if(request->proxy)
|
||||
res = HTTP_SecureProxyConnect(request);
|
||||
if(res == ERROR_SUCCESS)
|
||||
res = NETCON_secure_connect(request->netconn);
|
||||
res = NETCON_secure_connect(request->netconn, request->server);
|
||||
}
|
||||
|
||||
if(res != ERROR_SUCCESS) {
|
||||
|
|
|
@ -538,7 +538,7 @@ BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundP
|
|||
DWORD create_netconn(BOOL,server_t*,DWORD,BOOL,DWORD,netconn_t**) DECLSPEC_HIDDEN;
|
||||
void free_netconn(netconn_t*) DECLSPEC_HIDDEN;
|
||||
void NETCON_unload(void) DECLSPEC_HIDDEN;
|
||||
DWORD NETCON_secure_connect(netconn_t *connection) DECLSPEC_HIDDEN;
|
||||
DWORD NETCON_secure_connect(netconn_t*,server_t*) DECLSPEC_HIDDEN;
|
||||
DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags,
|
||||
int *sent /* out */) DECLSPEC_HIDDEN;
|
||||
DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, int flags,
|
||||
|
|
|
@ -707,7 +707,6 @@ DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, BOOL m
|
|||
if(!netconn)
|
||||
return ERROR_OUTOFMEMORY;
|
||||
|
||||
netconn->useSSL = useSSL;
|
||||
netconn->socketFD = -1;
|
||||
netconn->security_flags = security_flags | server->security_flags;
|
||||
netconn->mask_errors = mask_errors;
|
||||
|
@ -903,7 +902,7 @@ fail:
|
|||
* NETCON_secure_connect
|
||||
* Initiates a secure connection over an existing plaintext connection.
|
||||
*/
|
||||
DWORD NETCON_secure_connect(netconn_t *connection)
|
||||
DWORD NETCON_secure_connect(netconn_t *connection, server_t *server)
|
||||
{
|
||||
DWORD res = ERROR_NOT_SUPPORTED;
|
||||
#ifdef SONAME_LIBSSL
|
||||
|
@ -914,6 +913,13 @@ DWORD NETCON_secure_connect(netconn_t *connection)
|
|||
return ERROR_INTERNET_CANNOT_CONNECT;
|
||||
}
|
||||
|
||||
connection->useSSL = TRUE;
|
||||
if(server != connection->server) {
|
||||
server_release(connection->server);
|
||||
server_addref(server);
|
||||
connection->server = server;
|
||||
}
|
||||
|
||||
/* connect with given TLS options */
|
||||
res = netcon_secure_connect_setup(connection, get_tls_option());
|
||||
if (res == ERROR_SUCCESS)
|
||||
|
|
Loading…
Reference in New Issue