Skip to content

Commit c31f9e9

Browse files
authored
Merge pull request #96 from Tmonster/use_curl_as_optional_client_v1.4
Use curl as optional client v1.4
2 parents bb03d06 + 0bb4efa commit c31f9e9

File tree

15 files changed

+827
-96
lines changed

15 files changed

+827
-96
lines changed

.github/workflows/MinioTests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
AWS_SECRET_ACCESS_KEY: minio_duckdb_user_password
1919
DUCKDB_S3_ENDPOINT: duckdb-minio.com:9000
2020
DUCKDB_S3_USE_SSL: false
21+
CORE_EXTENSIONS: 'parquet;json'
2122
GEN: ninja
23+
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
2224
VCPKG_TARGET_TRIPLET: x64-linux
2325

2426
steps:

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include_directories(extension/httpfs/include
1010
${DUCKDB_MODULE_BASE_DIR}/third_party/httplib)
1111

1212
if (NOT EMSCRIPTEN)
13-
set(EXTRA_SOURCES extension/httpfs/crypto.cpp extension/httpfs/httpfs_client.cpp)
13+
set(EXTRA_SOURCES extension/httpfs/crypto.cpp extension/httpfs/httpfs_httplib_client.cpp extension/httpfs/httpfs_curl_client.cpp)
1414
add_definitions(-DOVERRIDE_ENCRYPTION_UTILS=1)
1515
else()
1616
set(EXTRA_SOURCES extension/httpfs/httpfs_client_wasm.cpp)
@@ -48,21 +48,29 @@ if(MINGW)
4848
endif()
4949

5050
find_package(OpenSSL REQUIRED)
51+
find_package(CURL REQUIRED)
5152
include_directories(${OPENSSL_INCLUDE_DIR})
53+
include_directories(${CURL_INCLUDE_DIRS})
5254
if(EMSCRIPTEN)
5355
target_link_libraries(httpfs_loadable_extension duckdb_mbedtls)
5456
else()
5557
target_link_libraries(httpfs_loadable_extension duckdb_mbedtls
5658
${OPENSSL_LIBRARIES})
5759
target_link_libraries(httpfs_extension duckdb_mbedtls ${OPENSSL_LIBRARIES})
5860

61+
# Link dependencies into extension
62+
target_link_libraries(httpfs_loadable_extension ${CURL_LIBRARIES})
63+
target_link_libraries(httpfs_extension ${CURL_LIBRARIES})
64+
65+
5966
if(MINGW)
6067
find_package(ZLIB)
6168
target_link_libraries(httpfs_loadable_extension ZLIB::ZLIB -lcrypt32)
6269
target_link_libraries(httpfs_extension ZLIB::ZLIB -lcrypt32)
6370
endif()
6471
endif()
6572

73+
6674
install(
6775
TARGETS httpfs_extension
6876
EXPORT "${DUCKDB_EXPORT_SET}"

duckdb

Submodule duckdb updated 824 files

extension/httpfs/crypto.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
#include <stdio.h>
77

88
#define CPPHTTPLIB_OPENSSL_SUPPORT
9-
#include "httplib.hpp"
9+
10+
#include <openssl/err.h>
11+
#include <openssl/evp.h>
12+
#include <openssl/ssl.h>
13+
#include <openssl/x509v3.h>
14+
#include <openssl/rand.h>
15+
16+
#if defined(_WIN32) && defined(OPENSSL_USE_APPLINK)
17+
#include <openssl/applink.c>
18+
#endif
1019

1120
namespace duckdb {
1221

0 commit comments

Comments
 (0)