winhttp: Support setting security flags on request handles.
This commit is contained in:
parent
14e061a5c4
commit
41e147e68f
|
@ -723,8 +723,27 @@ static BOOL request_set_option( object_header_t *hdr, DWORD option, LPVOID buffe
|
|||
return TRUE;
|
||||
}
|
||||
case WINHTTP_OPTION_SECURITY_FLAGS:
|
||||
FIXME("WINHTTP_OPTION_SECURITY_FLAGS unimplemented (%08x)\n", *(DWORD *)buffer);
|
||||
{
|
||||
DWORD flags;
|
||||
|
||||
if (buflen < sizeof(DWORD))
|
||||
{
|
||||
set_last_error( ERROR_INSUFFICIENT_BUFFER );
|
||||
return FALSE;
|
||||
}
|
||||
flags = *(DWORD *)buffer;
|
||||
TRACE("0x%x\n", flags);
|
||||
if (!(flags & (SECURITY_FLAG_IGNORE_CERT_CN_INVALID |
|
||||
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
|
||||
SECURITY_FLAG_IGNORE_UNKNOWN_CA |
|
||||
SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE)))
|
||||
{
|
||||
set_last_error( ERROR_INVALID_PARAMETER );
|
||||
return FALSE;
|
||||
}
|
||||
request->security_flags = flags;
|
||||
return TRUE;
|
||||
}
|
||||
case WINHTTP_OPTION_RESOLVE_TIMEOUT:
|
||||
request->resolve_timeout = *(DWORD *)buffer;
|
||||
return TRUE;
|
||||
|
|
|
@ -155,6 +155,7 @@ typedef struct
|
|||
DWORD content_read; /* bytes read so far */
|
||||
header_t *headers;
|
||||
DWORD num_headers;
|
||||
DWORD security_flags;
|
||||
} request_t;
|
||||
|
||||
typedef struct _task_header_t task_header_t;
|
||||
|
|
Loading…
Reference in New Issue