Skip to content

Commit

Permalink
Rebase cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Dec 21, 2024
1 parent 4d17f6d commit d25be05
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Empty file removed cpr/ssl_ctx.cpp
Empty file.
2 changes: 2 additions & 0 deletions cpr/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ int debugUserFunction(CURL* /*handle*/, curl_infotype type, char* data, size_t s
return 0;
}

#if SUPPORT_CURLOPT_SSL_CTX_FUNCTION
CURLcode sslCtxUserFunction(CURL* curl, void* sslctx, const ssl::SslCtxCallback* ctx) {
return (*ctx)(curl, sslctx);
}
#endif // SUPPORT_CURLOPT_SSL_CTX_FUNCTION

/**
* Creates a temporary CurlHolder object and uses it to escape the given string.
Expand Down
2 changes: 2 additions & 0 deletions include/cpr/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ class Session : public std::enable_shared_from_this<Session> {
* Ensures that the "Transfer-Encoding" is set to "chunked", if not overriden in header_.
**/
ReadCallback readcb_;
#if SUPPORT_CURLOPT_SSL_CTX_FUNCTION
ssl::SslCtxCallback sslctxcb_;
#endif SUPPORT_CURLOPT_SSL_CTX_FUNCTION
HeaderCallback headercb_;
WriteCallback writecb_;
ProgressCallback progresscb_;
Expand Down
2 changes: 2 additions & 0 deletions include/cpr/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ size_t headerUserFunction(char* ptr, size_t size, size_t nmemb, const HeaderCall
size_t writeFunction(char* ptr, size_t size, size_t nmemb, std::string* data);
size_t writeFileFunction(char* ptr, size_t size, size_t nmemb, std::ofstream* file);
size_t writeUserFunction(char* ptr, size_t size, size_t nmemb, const WriteCallback* write);
#if SUPPORT_CURLOPT_SSL_CTX_FUNCTION
CURLcode sslCtxUserFunction(CURL* curl, void* sslctx, const ssl::SslCtxCallback* ctx);
#endif // SUPPORT_CURLOPT_SSL_CTX_FUNCTION

template <typename T = ProgressCallback>
int progressUserFunction(const T* progress, cpr_pf_arg_t dltotal, cpr_pf_arg_t dlnow, cpr_pf_arg_t ultotal, cpr_pf_arg_t ulnow) {
Expand Down

0 comments on commit d25be05

Please sign in to comment.