File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,14 @@ class HTTPFSCurlClient : public HTTPClient {
130130 // call curl_global_init if not already done by another HTTPFS Client
131131 InitCurlGlobal ();
132132
133- curl = make_uniq<CURLHandle>(bearer_token, SelectCURLCertPath ());
133+ std::string cert_file_path;
134+ if (!http_params.ca_cert_file .empty ()) {
135+ cert_file_path = http_params.ca_cert_file ;
136+ } else {
137+ cert_file_path = SelectCURLCertPath ();
138+ }
139+
140+ curl = make_uniq<CURLHandle>(bearer_token, cert_file_path);
134141 request_info = make_uniq<RequestInfo>();
135142
136143 // set curl options
Original file line number Diff line number Diff line change 1+ # name: test/sql/httpfs/ca_cert_file.test
2+ # description: Test that invalid ca_cert_file causes SSL connection to fail
3+ # group: [httpfs]
4+
5+ require httpfs
6+
7+ statement ok
8+ SET enable_server_cert_verification = true;
9+
10+ statement ok
11+ SET ca_cert_file = 'README.md';
12+
13+ statement error
14+ FROM read_blob('https://duckdb.org/')
15+ ----
16+ <REGEX>:.*IO Error.*SSL.*
You can’t perform that action at this time.
0 commit comments