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)
|
if(request->proxy)
|
||||||
res = HTTP_SecureProxyConnect(request);
|
res = HTTP_SecureProxyConnect(request);
|
||||||
if(res == ERROR_SUCCESS)
|
if(res == ERROR_SUCCESS)
|
||||||
res = NETCON_secure_connect(request->netconn);
|
res = NETCON_secure_connect(request->netconn, request->server);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res != ERROR_SUCCESS) {
|
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;
|
DWORD create_netconn(BOOL,server_t*,DWORD,BOOL,DWORD,netconn_t**) DECLSPEC_HIDDEN;
|
||||||
void free_netconn(netconn_t*) DECLSPEC_HIDDEN;
|
void free_netconn(netconn_t*) DECLSPEC_HIDDEN;
|
||||||
void NETCON_unload(void) 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,
|
DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags,
|
||||||
int *sent /* out */) DECLSPEC_HIDDEN;
|
int *sent /* out */) DECLSPEC_HIDDEN;
|
||||||
DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, int flags,
|
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)
|
if(!netconn)
|
||||||
return ERROR_OUTOFMEMORY;
|
return ERROR_OUTOFMEMORY;
|
||||||
|
|
||||||
netconn->useSSL = useSSL;
|
|
||||||
netconn->socketFD = -1;
|
netconn->socketFD = -1;
|
||||||
netconn->security_flags = security_flags | server->security_flags;
|
netconn->security_flags = security_flags | server->security_flags;
|
||||||
netconn->mask_errors = mask_errors;
|
netconn->mask_errors = mask_errors;
|
||||||
@ -903,7 +902,7 @@ fail:
|
|||||||
* NETCON_secure_connect
|
* NETCON_secure_connect
|
||||||
* Initiates a secure connection over an existing plaintext connection.
|
* 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;
|
DWORD res = ERROR_NOT_SUPPORTED;
|
||||||
#ifdef SONAME_LIBSSL
|
#ifdef SONAME_LIBSSL
|
||||||
@ -914,6 +913,13 @@ DWORD NETCON_secure_connect(netconn_t *connection)
|
|||||||
return ERROR_INTERNET_CANNOT_CONNECT;
|
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 */
|
/* connect with given TLS options */
|
||||||
res = netcon_secure_connect_setup(connection, get_tls_option());
|
res = netcon_secure_connect_setup(connection, get_tls_option());
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user