Commit f3dd75d8 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Set SECURITY_FLAG_STRENGTH_* flags in NETCONN_secure_connect.

parent 90ec92df
...@@ -1999,16 +1999,9 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe ...@@ -1999,16 +1999,9 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
*size = sizeof(DWORD); *size = sizeof(DWORD);
flags = req->netconn ? req->netconn->security_flags : req->security_flags | req->server->security_flags; 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; *(DWORD *)buffer = flags;
TRACE("INTERNET_OPTION_SECURITY_FLAGS %x\n", flags);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
......
...@@ -688,6 +688,7 @@ DWORD NETCON_secure_connect(netconn_t *connection) ...@@ -688,6 +688,7 @@ DWORD NETCON_secure_connect(netconn_t *connection)
DWORD res = ERROR_NOT_SUPPORTED; DWORD res = ERROR_NOT_SUPPORTED;
#ifdef SONAME_LIBSSL #ifdef SONAME_LIBSSL
void *ssl_s; void *ssl_s;
int bits;
/* can't connect if we are already connected */ /* can't connect if we are already connected */
if (connection->ssl_s) if (connection->ssl_s)
...@@ -730,7 +731,15 @@ DWORD NETCON_secure_connect(netconn_t *connection) ...@@ -730,7 +731,15 @@ DWORD NETCON_secure_connect(netconn_t *connection)
connection->ssl_s = ssl_s; 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->security_flags |= SECURITY_FLAG_SECURE;
connection->server->security_flags = connection->security_flags; connection->server->security_flags = connection->security_flags;
return ERROR_SUCCESS; return ERROR_SUCCESS;
......
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