Hans Leidekker : rpcrt4: Use the right port for https connections.

Alexandre Julliard julliard at winehq.org
Mon Mar 25 14:19:39 CDT 2013


Module: wine
Branch: master
Commit: 9967aed09db32909ce7116e7cad804bec8998dc1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9967aed09db32909ce7116e7cad804bec8998dc1

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Mar 25 13:26:03 2013 +0100

rpcrt4: Use the right port for https connections.

---

 dlls/rpcrt4/rpc_transport.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index fc81bbe..6adc289 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -2066,7 +2066,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
     LPWSTR password = NULL;
     LPWSTR servername = NULL;
     const WCHAR *option;
-    INTERNET_PORT port = INTERNET_INVALID_PORT_NUMBER; /* use default port */
+    INTERNET_PORT port;
 
     if (httpc->common.QOS &&
         (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)
         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,
                                       INTERNET_SERVICE_HTTP, 0, 0);
 




More information about the wine-cvs mailing list