Does this issue affect the google-cloud-cpp project?
Yes
What component of google-cloud-cpp is this related to?google/cloud/storage
Describe the bug
When I call ClientOptions::CreateDefaultClientOptions(channel_options) with channel_options provided which contains the SSL root path used for CURLOPT_CAINFO, I expect that the SSL root path is used for credentials request and other request like bucket accesses. The current issue is that the SSL root path is used only for the bucket accesses but not for the credential request.
To Reproduce
Steps to reproduce the behavior:
Call function 'ClientOptions::CreateDefaultClientOptions(channel_options)', example from quickstart.cc:
--- a/google/cloud/storage/quickstart/quickstart.cc
+++ b/google/cloud/storage/quickstart/quickstart.cc
@@ -13,6 +13,7 @@
// limitations under the License.
#include "google/cloud/storage/client.h"
+#include "google/cloud/storage/client_options.h"
#include <iostream>
int main(int argc, char* argv[]) {
@@ -26,10 +27,15 @@ int main(int argc, char* argv[]) {
// Create aliases to make the code easier to read.
namespace gcs = google::cloud::storage;
auto options = gcs::ClientOptions::CreateDefaultClientOptions(channel_options);
if (!options) throw std::runtime_error(options.status().message());
// Create a client to communicate with Google Cloud Storage. This client
// uses the default configuration for authentication and project id.
google::cloud::StatusOr client =
gcs::Client::CreateDefaultClient();
auto client = google::cloud::StatusOr(gcs::Client(*options));
if (!client) {
std::cerr << "Failed to create Storage Client, status=" << client.status()
<< "\n";
with strace -yy -etrace=file quickstart , check the first .crt file opened
first is /etc/ssl/certs/ca-certificates.crt (the one defined by default in libcurl) then others for write and read request use the provided file ~/my_certs.crt
Expected behavior
The provided SSL root path is used only for the credential request too.
Does this issue affect the google-cloud-cpp project? Yes
What component of
google-cloud-cpp
is this related to?google/cloud/storage
Describe the bug When I call
ClientOptions::CreateDefaultClientOptions(channel_options)
withchannel_options
provided which contains the SSL root path used for CURLOPT_CAINFO, I expect that the SSL root path is used for credentials request and other request like bucket accesses. The current issue is that the SSL root path is used only for the bucket accesses but not for the credential request.To Reproduce Steps to reproduce the behavior:
Call function 'ClientOptions::CreateDefaultClientOptions(channel_options)', example from quickstart.cc:
// Create a client to communicate with Google Cloud Storage. This client // uses the default configuration for authentication and project id.
Expected behavior The provided SSL root path is used only for the credential request too.
Operating system: Ubuntu
What compiler and version are you using?
What version of
google-cloud-cpp
are you using? tag v1.20.0Additional context NA