Commit 9967aed0 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

rpcrt4: Use the right port for https connections.

parent c09c82b2
...@@ -2066,7 +2066,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc) ...@@ -2066,7 +2066,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
LPWSTR password = NULL; LPWSTR password = NULL;
LPWSTR servername = NULL; LPWSTR servername = NULL;
const WCHAR *option; const WCHAR *option;
INTERNET_PORT port = INTERNET_INVALID_PORT_NUMBER; /* use default port */ INTERNET_PORT port;
if (httpc->common.QOS && if (httpc->common.QOS &&
(httpc->common.QOS->qos->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP)) (httpc->common.QOS->qos->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP))
...@@ -2163,6 +2163,11 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc) ...@@ -2163,6 +2163,11 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
MultiByteToWideChar(CP_ACP, 0, httpc->common.NetworkAddr, -1, servername, strlen(httpc->common.NetworkAddr) + 1); MultiByteToWideChar(CP_ACP, 0, httpc->common.NetworkAddr, -1, servername, strlen(httpc->common.NetworkAddr) + 1);
} }
port = (httpc->common.QOS &&
(httpc->common.QOS->qos->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP) &&
(httpc->common.QOS->qos->u.HttpCredentials->Flags & RPC_C_HTTP_FLAG_USE_SSL)) ?
INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;
httpc->session = InternetConnectW(httpc->app_info, servername, port, user, password, httpc->session = InternetConnectW(httpc->app_info, servername, port, user, password,
INTERNET_SERVICE_HTTP, 0, 0); INTERNET_SERVICE_HTTP, 0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment