IBackgroundCopyJobHttpOptions::SetSecurityFlags method (bits2_5.h)
Sets flags for HTTP that determine whether the certificate revocation list is checked and certain certificate errors are ignored, and the policy to use when a server redirects the HTTP request.
HRESULT SetSecurityFlags( [in] ULONG Flags );
HTTP security flags that indicate which errors to ignore when connecting to the server. You can set one or more of the following flags:
The following table lists some of the possible return values.
||Successfully retrieved the headers.|
||The flag value is not supported.|
If CRL checking is requested, BITS performs the check for all files in the job that specify the HTTPS protocol. The check is made for each file before the file begins transferring. If you set this value to TRUE after BITS has partially downloaded a file, BITS will reschedule the job and begin downloading the file again. Files that are already downloaded are not affected.
BITS uses the CRL on the local computer if the CRL is up-to-date; otherwise, BITS downloads the CRL from the certification authority (CA) that signed the certificate.
The job goes into the fatal error state if the following errors occur.
|ERROR_WINHTTP_SECURE_CERT_REV_FAILED||Unable to request CRL checking because the certificate server is offline or the CRL cannot be downloaded.|
|ERROR_WINHTTP_SECURE_CERT_REVOKED||The certificate is revoked.|
The redirect policy applies to all files in a download job (the policy does not apply to upload jobs).
Prior to BITS 3.0: The redirect policies are not supported.
If the policy is BG_HTTP_REDIRECT_POLICY_DISALLOW and the server redirects your request, the job is placed in the fatal error state with one of the following error codes. For descriptions of the error codes, see HTTP Status Codes.
If peer caching is enabled and you specify BG_HTTP_REDIRECT_POLICY_ALLOW_REPORT, the file is stored in the cache with the final redirected URL. If a peer then tries to download the file with the original URL, the peer will not find the file in the peer's cache and will end up downloading the file from the origin server.
If you specify and the file is downloaded from the
Note that setting BG_HTTP_REDIRECT_POLICY_ALLOW_REPORT may affect the result when calling the IBackgroundCopyJob3::ReplaceRemotePrefix method. If a server redirected your request, BITS will have already changed the original URL to the final redirected URL, so calling the ReplaceRemotePrefix method will not find files with the original URL.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||bits2_5.h (include Bits.h)|