Rename winhttp transport option (#3488)

* rename option
This commit is contained in:
Victor Vazquez 2022-03-31 12:19:25 -07:00 committed by GitHub
parent b7a79158d2
commit 4ab3901bbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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;
};
/**

View File

@ -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(

View File

@ -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