Author: cgutman
Date: Mon Dec 20 20:36:21 2010
New Revision: 50071
URL:
http://svn.reactos.org/svn/reactos?rev=50071&view=rev
Log:
[WINHTTP]
- Sync to Wine 1.3.9
Modified:
trunk/reactos/dll/win32/winhttp/net.c
Modified: trunk/reactos/dll/win32/winhttp/net.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/net.c?re…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/net.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/net.c [iso-8859-1] Mon Dec 20 20:36:21 2010
@@ -92,7 +92,7 @@
static void *libssl_handle;
static void *libcrypto_handle;
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER> 0x1000000)
+#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER > 0x10000000)
static const SSL_METHOD *method;
#else
static SSL_METHOD *method;
@@ -277,7 +277,8 @@
TRACE("verifying %s\n", debugstr_w( server ));
chainPara.RequestedUsage.Usage.cUsageIdentifier = 1;
chainPara.RequestedUsage.Usage.rgpszUsageIdentifier = server_auth;
- if ((ret = CertGetCertificateChain( NULL, cert, NULL, store, &chainPara, 0,
+ if ((ret = CertGetCertificateChain( NULL, cert, NULL, store, &chainPara,
+ CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT,
NULL, &chain )))
{
if (chain->TrustStatus.dwErrorStatus)
@@ -330,6 +331,7 @@
sslExtraPolicyPara.u.cbSize = sizeof(sslExtraPolicyPara);
sslExtraPolicyPara.dwAuthType = AUTHTYPE_SERVER;
sslExtraPolicyPara.pwszServerName = server;
+ sslExtraPolicyPara.fdwChecks = security_flags;
policyPara.cbSize = sizeof(policyPara);
policyPara.dwFlags = 0;
policyPara.pvExtraPolicyPara = &sslExtraPolicyPara;
@@ -342,10 +344,7 @@
if (ret && policyStatus.dwError)
{
if (policyStatus.dwError == CERT_E_CN_NO_MATCH)
- {
- if (!(security_flags & SECURITY_FLAG_IGNORE_CERT_CN_INVALID))
- err = ERROR_WINHTTP_SECURE_CERT_CN_INVALID;
- }
+ err = ERROR_WINHTTP_SECURE_CERT_CN_INVALID;
else
err = ERROR_WINHTTP_SECURE_INVALID_CERT;
}
@@ -876,10 +875,10 @@
return FALSE;
#endif
}
-
+
FD_ZERO(&infd);
FD_SET(conn->socket, &infd);
-
+
while (recvd < *buflen)
{
int res;
@@ -890,7 +889,7 @@
ptv = &tv;
else
ptv = NULL;
-
+
if (select( 0, &infd, NULL, NULL, ptv ) > 0)
{
if ((res = recv( conn->socket, &buffer[recvd], 1, 0 )) <= 0)
@@ -1086,7 +1085,11 @@
int netconn_get_cipher_strength( netconn_t *conn )
{
#ifdef SONAME_LIBSSL
+#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090707f)
+ const SSL_CIPHER *cipher;
+#else
SSL_CIPHER *cipher;
+#endif
int bits = 0;
if (!conn->secure) return 0;