parent
b7a79158d2
commit
4ab3901bbb
@ -5,7 +5,7 @@
|
||||
### Features Added
|
||||
|
||||
- When a `RequestFailedException` exception is thrown, the `what()` method now includes information about the HTTP request which failed.
|
||||
- Adding option `WinHttpTransportOptions.IgnoreUnknownServerCert`. It can be used to disable verifying server certificate for the `WinHttpTransport`.
|
||||
- Adding option `WinHttpTransportOptions.IgnoreUnknownCertificateAuthority`. It can be used to disable verifying server certificate for the `WinHttpTransport`.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
||||
@ -129,10 +129,9 @@ namespace Azure { namespace Core { namespace Http {
|
||||
struct WinHttpTransportOptions final
|
||||
{
|
||||
/**
|
||||
* @brief When `true`, allows an invalid certificate authority. If this flag is set, the
|
||||
* application does not receive a WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA callback.
|
||||
* @brief When `true`, allows an invalid certificate authority.
|
||||
*/
|
||||
bool IgnoreUnknownServerCert = false;
|
||||
bool IgnoreUnknownCertificateAuthority = false;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -359,7 +359,7 @@ void WinHttpTransport::CreateRequestHandle(std::unique_ptr<_detail::HandleManage
|
||||
}
|
||||
}
|
||||
|
||||
if (m_options.IgnoreUnknownServerCert)
|
||||
if (m_options.IgnoreUnknownCertificateAuthority)
|
||||
{
|
||||
auto option = SECURITY_FLAG_IGNORE_UNKNOWN_CA;
|
||||
if (!WinHttpSetOption(
|
||||
|
||||
@ -116,7 +116,7 @@ namespace Azure { namespace Perf {
|
||||
= std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
|
||||
#elif defined(BUILD_TRANSPORT_WINHTTP_ADAPTER)
|
||||
Azure::Core::Http::WinHttpTransportOptions winHttpOptions;
|
||||
winHttpOptions.IgnoreUnknownServerCert = true;
|
||||
winHttpOptions.IgnoreUnknownCertificateAuthority = true;
|
||||
clientOptions.Transport.Transport
|
||||
= std::make_shared<Azure::Core::Http::WinHttpTransport>(winHttpOptions);
|
||||
#else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user