Skip to content

Commit ee13c6b

Browse files
committed
Merge remote-tracking branch 'origin/main' into faster_multi_globbing
2 parents 1fc8e51 + 3e8ad5b commit ee13c6b

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/httpfs_curl_client.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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

test/sql/httpfs/ca_cert_file.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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.*

0 commit comments

Comments
 (0)