update noRevoke (#1678)
* update noRevoke * use EnableCertificateRevocationListCheck instead of Disable
This commit is contained in:
parent
bc83b64098
commit
5f523f7030
@ -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`.
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user