Jacek Caban : wininet: Set SECURITY_FLAG_STRENGTH_* flags in NETCONN_secure_connect.
Alexandre Julliard
julliard at winehq.org
Fri May 25 10:52:49 CDT 2012
Module: wine
Branch: master
Commit: f3dd75d8a4da66da467a6e026ec8c1a5ee8339b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f3dd75d8a4da66da467a6e026ec8c1a5ee8339b8
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri May 25 16:35:12 2012 +0200
wininet: Set SECURITY_FLAG_STRENGTH_* flags in NETCONN_secure_connect.
---
dlls/wininet/http.c | 11 ++---------
dlls/wininet/netconnection.c | 9 +++++++++
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 1943e91..50f77df 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1999,16 +1999,9 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
*size = sizeof(DWORD);
flags = req->netconn ? req->netconn->security_flags : req->security_flags | req->server->security_flags;
- if(req->netconn) {
- int bits = NETCON_GetCipherStrength(req->netconn);
- if (bits >= 128)
- flags |= SECURITY_FLAG_STRENGTH_STRONG;
- else if (bits >= 56)
- flags |= SECURITY_FLAG_STRENGTH_MEDIUM;
- else
- flags |= SECURITY_FLAG_STRENGTH_WEAK;
- }
*(DWORD *)buffer = flags;
+
+ TRACE("INTERNET_OPTION_SECURITY_FLAGS %x\n", flags);
return ERROR_SUCCESS;
}
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index ac9f347..66e1734 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -688,6 +688,7 @@ DWORD NETCON_secure_connect(netconn_t *connection)
DWORD res = ERROR_NOT_SUPPORTED;
#ifdef SONAME_LIBSSL
void *ssl_s;
+ int bits;
/* can't connect if we are already connected */
if (connection->ssl_s)
@@ -730,7 +731,15 @@ DWORD NETCON_secure_connect(netconn_t *connection)
connection->ssl_s = ssl_s;
+ bits = NETCON_GetCipherStrength(connection);
+ if (bits >= 128)
+ connection->security_flags |= SECURITY_FLAG_STRENGTH_STRONG;
+ else if (bits >= 56)
+ connection->security_flags |= SECURITY_FLAG_STRENGTH_MEDIUM;
+ else
+ connection->security_flags |= SECURITY_FLAG_STRENGTH_WEAK;
connection->security_flags |= SECURITY_FLAG_SECURE;
+
connection->server->security_flags = connection->security_flags;
return ERROR_SUCCESS;
More information about the wine-cvs
mailing list