Remove libcurl non required options (#1153)
Fixes: https://github.com/azure/azure-sdk-for-cpp/issues/931
This commit is contained in:
parent
0b9befe13d
commit
8cd93803c4
@ -10,6 +10,7 @@
|
||||
|
||||
- Removed `DateTime::operator Duration()`.
|
||||
- Moved `Azure::Core::BearerTokenAuthenticationPolicy`, defined in `azure/core/credentials.hpp` to `Azure::Core::Http` namespace in `azure/core/http/policy.hpp` header.
|
||||
- Removed option `AllowBeast` from `CurlTransportSSLOptions` in `CurlTransportOptions`.
|
||||
- Changed default option `NoRevoke` from `CurlTransportSSLOptions` for the `CurlTransportOptions` to `true`. This disables the revocation list checking by default.
|
||||
|
||||
## 1.0.0-beta.3 (2020-11-11)
|
||||
|
||||
@ -25,7 +25,6 @@ namespace Azure { namespace Core { namespace Http {
|
||||
*/
|
||||
struct CurlTransportSSLOptions
|
||||
{
|
||||
bool AllowBeast = false;
|
||||
/**
|
||||
* @brief This option can disable the revocation list check.
|
||||
*
|
||||
|
||||
@ -1103,10 +1103,6 @@ std::unique_ptr<CurlNetworkConnection> CurlConnectionPool::GetCurlConnection(
|
||||
}
|
||||
|
||||
long sslOption = 0;
|
||||
if (options.SSLOptions.AllowBeast)
|
||||
{
|
||||
sslOption |= CURLSSLOPT_ALLOW_BEAST;
|
||||
}
|
||||
if (options.SSLOptions.NoRevoke)
|
||||
{
|
||||
sslOption |= CURLSSLOPT_NO_REVOKE;
|
||||
|
||||
@ -85,38 +85,6 @@ namespace Azure { namespace Core { namespace Test {
|
||||
EXPECT_NO_THROW(Azure::Core::Http::CurlConnectionPool::ConnectionPoolIndex.clear());
|
||||
}
|
||||
|
||||
TEST(CurlTransportOptions, allowBeast)
|
||||
{
|
||||
Azure::Core::Http::CurlTransportOptions curlOptions;
|
||||
curlOptions.SSLOptions.AllowBeast = true;
|
||||
|
||||
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
|
||||
Azure::Core::Http::TransportPolicyOptions options;
|
||||
options.Transport = transportAdapter;
|
||||
auto transportPolicy = std::make_unique<Azure::Core::Http::TransportPolicy>(options);
|
||||
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::move(transportPolicy));
|
||||
Azure::Core::Http::HttpPipeline pipeline(policies);
|
||||
|
||||
Azure::Core::Http::Url url("https://httpbin.org/get");
|
||||
Azure::Core::Http::Request request(Azure::Core::Http::HttpMethod::Get, url);
|
||||
|
||||
std::unique_ptr<Azure::Core::Http::RawResponse> response;
|
||||
EXPECT_NO_THROW(response = pipeline.Send(Azure::Core::GetApplicationContext(), request));
|
||||
auto responseCode = response->GetStatusCode();
|
||||
int expectedCode = 200;
|
||||
EXPECT_PRED2(
|
||||
[](int expected, int code) { return expected == code; },
|
||||
expectedCode,
|
||||
static_cast<typename std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
responseCode));
|
||||
|
||||
// Clean the connection from the pool *Windows fails to clean if we leave to be clean uppon
|
||||
// app-destruction
|
||||
EXPECT_NO_THROW(Azure::Core::Http::CurlConnectionPool::ConnectionPoolIndex.clear());
|
||||
}
|
||||
|
||||
/*
|
||||
// Requires libcurl version >= 7.68
|
||||
TEST(CurlTransportOptions, nativeCA)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user