Update ssl name (#2066)

* raname

* changelog
This commit is contained in:
Victor Vazquez 2021-04-07 11:25:13 -07:00 committed by GitHub
parent a786595565
commit 17c17c9b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 13 deletions

View File

@ -30,6 +30,9 @@
- Changed the `Azure::Core::Http::HttpMethod` regular enum into an extensible enum class and removed the `HttpMethodToString()` helper method.
- Removed `Azure::Core::Http::Request::GetHeadersAsString()`.
- Introduced `Azure::Core::Context::Key` class which takes place of `std::string` used for `Azure::Core::Context` keys previously.
- Renamed type `Azure::Core::Http::CurlTransportSSLOptions` to `Azure::Core::Http::CurlTransportSslOptions`.
- Renamed member `Azure::Core::Http::CurlTransportOptions::SSLOptions` to `Azure::Core::Http::CurlTransportOptions::SslOptions`.
- Renamed member `Azure::Core::Http::CurlTransportOptions::SSLVerifyPeer` to `Azure::Core::Http::CurlTransportOptions::SslVerifyPeer`.
## 1.0.0-beta.7 (2021-03-11)

View File

@ -21,7 +21,7 @@ namespace Azure { namespace Core { namespace Http {
* https://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html
*
*/
struct CurlTransportSSLOptions
struct CurlTransportSslOptions
{
/**
* @brief This option can enable the revocation list check.
@ -79,7 +79,7 @@ namespace Azure { namespace Core { namespace Http {
* https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
*
*/
bool SSLVerifyPeer = true;
bool SslVerifyPeer = true;
/**
* @brief Define the SSL options for the libcurl handle.
@ -88,7 +88,7 @@ namespace Azure { namespace Core { namespace Http {
* The default option is all options `false`.
*
*/
CurlTransportSSLOptions SSLOptions;
CurlTransportSslOptions SslOptions;
};
/**

View File

@ -1132,7 +1132,7 @@ inline std::string GetConnectionKey(std::string const& host, CurlTransportOption
{
key.append("0");
}
if (!options.SSLOptions.EnableCertificateRevocationListCheck)
if (!options.SslOptions.EnableCertificateRevocationListCheck)
{
key.append("1");
}
@ -1140,7 +1140,7 @@ inline std::string GetConnectionKey(std::string const& host, CurlTransportOption
{
key.append("0");
}
if (options.SSLVerifyPeer)
if (options.SslVerifyPeer)
{
key.append("1");
}
@ -1268,7 +1268,7 @@ std::unique_ptr<CurlNetworkConnection> CurlConnectionPool::ExtractOrCreateCurlCo
}
long sslOption = 0;
if (!options.SSLOptions.EnableCertificateRevocationListCheck)
if (!options.SslOptions.EnableCertificateRevocationListCheck)
{
sslOption |= CURLSSLOPT_NO_REVOKE;
}
@ -1281,7 +1281,7 @@ std::unique_ptr<CurlNetworkConnection> CurlConnectionPool::ExtractOrCreateCurlCo
+ std::string(curl_easy_strerror(result)));
}
if (!options.SSLVerifyPeer)
if (!options.SslVerifyPeer)
{
if (!SetLibcurlOption(newHandle, CURLOPT_SSL_VERIFYPEER, 0L, &result))
{

View File

@ -89,7 +89,7 @@ namespace Azure { namespace Core { namespace Test {
{
// Creating a new connection with options
Azure::Core::Http::CurlTransportOptions options;
options.SSLVerifyPeer = false;
options.SslVerifyPeer = false;
auto connection
= Azure::Core::Http::CurlConnectionPool::ExtractOrCreateCurlConnection(req, options);
EXPECT_EQ(connection->GetConnectionKey(), secondExpectedKey);

View File

@ -62,7 +62,7 @@ namespace Azure { namespace Core { namespace Test {
TEST(CurlTransportOptions, noRevoke)
{
Azure::Core::Http::CurlTransportOptions curlOptions;
curlOptions.SSLOptions.EnableCertificateRevocationListCheck = true;
curlOptions.SslOptions.EnableCertificateRevocationListCheck = true;
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
Azure::Core::Http::Policies::TransportOptions options;
@ -98,7 +98,7 @@ namespace Azure { namespace Core { namespace Test {
TEST(CurlTransportOptions, nativeCA)
{
Azure::Core::Http::CurlTransportOptions curlOptions;
curlOptions.SSLOptions.NativeCa = true;
curlOptions.SslOptions.NativeCa = true;
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
auto transportPolicy =
@ -124,7 +124,7 @@ namespace Azure { namespace Core { namespace Test {
TEST(CurlTransportOptions, noPartialChain)
{
Azure::Core::Http::CurlTransportOptions curlOptions;
curlOptions.SSLOptions.NoPartialchain = true;
curlOptions.SslOptions.NoPartialchain = true;
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
auto transportPolicy =
@ -150,7 +150,7 @@ namespace Azure { namespace Core { namespace Test {
TEST(CurlTransportOptions, bestEffort)
{
Azure::Core::Http::CurlTransportOptions curlOptions;
curlOptions.SSLOptions.RevokeBestEffort = true;
curlOptions.SslOptions.RevokeBestEffort = true;
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
auto transportPolicy =
@ -177,7 +177,7 @@ namespace Azure { namespace Core { namespace Test {
{
Azure::Core::Http::CurlTransportOptions curlOptions;
// If ssl verify is not disabled, this test would fail because the caInfo is not OK
curlOptions.SSLVerifyPeer = false;
curlOptions.SslVerifyPeer = false;
// This ca info should be ignored by verify disable and test should work
curlOptions.CAInfo = "/";