wininet: Store security flags in server_t.
This commit is contained in:
parent
3aeb8eb6b6
commit
59a0ab54cb
|
@ -266,6 +266,7 @@ static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
|
||||||
server->addr_len = 0;
|
server->addr_len = 0;
|
||||||
server->ref = 1;
|
server->ref = 1;
|
||||||
server->port = port;
|
server->port = port;
|
||||||
|
server->security_flags = 0;
|
||||||
list_init(&server->conn_pool);
|
list_init(&server->conn_pool);
|
||||||
server->name = heap_strdupW(name);
|
server->name = heap_strdupW(name);
|
||||||
if(server->name) {
|
if(server->name) {
|
||||||
|
@ -1997,10 +1998,9 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
||||||
return ERROR_INSUFFICIENT_BUFFER;
|
return ERROR_INSUFFICIENT_BUFFER;
|
||||||
|
|
||||||
*size = sizeof(DWORD);
|
*size = sizeof(DWORD);
|
||||||
flags = 0;
|
flags = req->netconn ? req->netconn->security_flags : req->security_flags | req->server->security_flags;
|
||||||
if (req->hdr.dwFlags & INTERNET_FLAG_SECURE)
|
if (req->hdr.dwFlags & INTERNET_FLAG_SECURE)
|
||||||
flags |= SECURITY_FLAG_SECURE;
|
flags |= SECURITY_FLAG_SECURE;
|
||||||
flags |= req->security_flags;
|
|
||||||
if(req->netconn) {
|
if(req->netconn) {
|
||||||
int bits = NETCON_GetCipherStrength(req->netconn);
|
int bits = NETCON_GetCipherStrength(req->netconn);
|
||||||
if (bits >= 128)
|
if (bits >= 128)
|
||||||
|
|
|
@ -63,6 +63,8 @@ typedef struct {
|
||||||
LONG ref;
|
LONG ref;
|
||||||
DWORD64 keep_until;
|
DWORD64 keep_until;
|
||||||
|
|
||||||
|
DWORD security_flags;
|
||||||
|
|
||||||
struct list entry;
|
struct list entry;
|
||||||
struct list conn_pool;
|
struct list conn_pool;
|
||||||
} server_t;
|
} server_t;
|
||||||
|
|
|
@ -511,7 +511,7 @@ DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, DWORD
|
||||||
|
|
||||||
netconn->useSSL = useSSL;
|
netconn->useSSL = useSSL;
|
||||||
netconn->socketFD = -1;
|
netconn->socketFD = -1;
|
||||||
netconn->security_flags = security_flags;
|
netconn->security_flags = security_flags | server->security_flags;
|
||||||
list_init(&netconn->pool_entry);
|
list_init(&netconn->pool_entry);
|
||||||
|
|
||||||
assert(server->addr_len);
|
assert(server->addr_len);
|
||||||
|
@ -729,6 +729,7 @@ DWORD NETCON_secure_connect(netconn_t *connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
connection->ssl_s = ssl_s;
|
connection->ssl_s = ssl_s;
|
||||||
|
connection->server->security_flags = connection->security_flags;
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|
Loading…
Reference in New Issue