update noRevoke (#1678)

* update noRevoke

* use EnableCertificateRevocationListCheck instead of Disable
This commit is contained in:
Victor Vazquez 2021-02-17 18:16:22 -08:00 committed by GitHub
parent bc83b64098
commit 5f523f7030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -7,6 +7,7 @@
- Removed `Azure::Core::Http::HttpPipeline` by making it internal, used only within the SDK.
- Split `Azure::Core::RequestConditions` into `Azure::Core::MatchConditions` and `Azure::Core::ModifiedConditions`.
- Removed `TransportKind` enum from `Azure::Core::Http`.
- Renamed `NoRevoke` to `EnableCertificateRevocationListCheck` for `Azure::Core::Http::CurlTransportSSLOptions`.
- Renamed `GetString()` to `ToString()` in `Azure::Core::DateTime`.
- Renamed `GetUuidString()` tp `ToString()` in `Azure::Core::Uuid`.

View File

@ -24,14 +24,14 @@ namespace Azure { namespace Core { namespace Http {
struct CurlTransportSSLOptions
{
/**
* @brief This option can disable the revocation list check.
* @brief This option can enable the revocation list check.
*
* @remark Libcurl does revocation list check by default for ssl backends that supports this
* feature. However, the Azure SDK overrides libcurl's behavior and disables the revocation list
* check by default.
*
*/
bool NoRevoke = true;
bool EnableCertificateRevocationListCheck = false;
};
/**

View File

@ -1077,7 +1077,7 @@ inline std::string GetConnectionKey(std::string const& host, CurlTransportOption
{
key.append("0");
}
if (options.SSLOptions.NoRevoke)
if (!options.SSLOptions.EnableCertificateRevocationListCheck)
{
key.append("1");
}
@ -1202,7 +1202,7 @@ std::unique_ptr<CurlNetworkConnection> CurlConnectionPool::GetCurlConnection(
}
long sslOption = 0;
if (options.SSLOptions.NoRevoke)
if (!options.SSLOptions.EnableCertificateRevocationListCheck)
{
sslOption |= CURLSSLOPT_NO_REVOKE;
}

View File

@ -58,7 +58,7 @@ namespace Azure { namespace Core { namespace Test {
TEST(CurlTransportOptions, noRevoke)
{
Azure::Core::Http::CurlTransportOptions curlOptions;
curlOptions.SSLOptions.NoRevoke = true;
curlOptions.SSLOptions.EnableCertificateRevocationListCheck = true;
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
Azure::Core::Http::TransportPolicyOptions options;