Skip to content

Commit

Permalink
Make azure sdk stick to winhttp if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoebus Mak authored and Phoebus Mak committed Sep 12, 2023
1 parent 5a6f40b commit a32523b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/arcticdb/storage/azure/azure_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ AzureStorage::AzureStorage(const LibraryPath &library_path, OpenMode mode, const
}

Azure::Storage::Blobs::BlobClientOptions AzureStorage::get_client_options(const Config &conf) {
Azure::Core::Http::CurlTransportOptions curl_transport_options;
curl_transport_options.CAInfo = conf.ca_cert_path();
BlobClientOptions client_options;
client_options.Transport.Transport = std::make_shared<Azure::Core::Http::CurlTransport>(curl_transport_options);
if (!conf.ca_cert_path().empty()) {//WARNING: Setting ca_cert_path will force Azure sdk uses libcurl as backend support, instead of winhttp
Azure::Core::Http::CurlTransportOptions curl_transport_options;
curl_transport_options.CAInfo = conf.ca_cert_path();
client_options.Transport.Transport = std::make_shared<Azure::Core::Http::CurlTransport>(curl_transport_options);
}
return client_options;
}

Expand Down
2 changes: 2 additions & 0 deletions python/arcticdb/arctic.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def __init__(self, uri: str, encoding_version: EncodingVersion = DEFAULT_ENCODIN
| | "/etc/pki/tls/cacert.pem" OpenELEC |
| | "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" CentOS/RHEL 7 |
| | "/etc/ssl/cert.pem" Alpine Linux |
| | WARNING for WINDOWS USER: Not leaving this empty will switch the backend support of Azure SDK from winhttp to libcurl. If ca cert path is needed to be |
| | specified, set it in Windows setting so winhttp will be used still |
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
Exception: Azure exceptions message always ends with `{AZURE_SDK_HTTP_STATUS_CODE}:{AZURE_SDK_REASON_PHRASE}`.
Expand Down

0 comments on commit a32523b

Please sign in to comment.