diff options
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftploaderthread.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-curl/CurlSession.cxx | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index b5ad2cb738ce..b8ef0b77f734 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -56,6 +56,8 @@ #include <ucbhelper/proxydecider.hxx> #include <ucbhelper/macros.hxx> #include <sax/tools/converter.hxx> +#include <curlinit.hxx> + #include <utility> #include "auth_provider.hxx" @@ -332,6 +334,9 @@ namespace cmis new CertValidationHandler( xEnv, m_xContext, aBindingUrl.GetHost( ) ) ); libcmis::SessionFactory::setCertificateValidationHandler( certHandler ); + // init libcurl callback + libcmis::SessionFactory::setCurlInitProtocolsFunction(&::InitCurl_easy); + // Get the auth credentials AuthProvider aAuthProvider(xEnv, m_xIdentifier->getContentIdentifier(), m_aURL.getBindingUrl()); AuthProvider::setXEnv( xEnv ); diff --git a/ucb/source/ucp/ftp/ftploaderthread.cxx b/ucb/source/ucp/ftp/ftploaderthread.cxx index f5ebfe36cdda..91130fc1bc9c 100644 --- a/ucb/source/ucp/ftp/ftploaderthread.cxx +++ b/ucb/source/ucp/ftp/ftploaderthread.cxx @@ -25,6 +25,8 @@ #include "ftploaderthread.hxx" #include "curl.hxx" +#include <curlinit.hxx> + using namespace ftp; @@ -75,6 +77,8 @@ CURL* FTPLoaderThread::handle() { if(!ret) { ret = curl_easy_init(); if (ret != nullptr) { + ::InitCurl_easy(ret); + // Make sure curl is not internally using environment variables like // "ftp_proxy": if (curl_easy_setopt(ret, CURLOPT_PROXY, "") != CURLE_OK) { diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index a881a1703dec..1d85d5df0ca5 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -35,6 +35,7 @@ #include <rtl/uri.hxx> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> +#include <curlinit.hxx> #include <config_version.h> #include <map> @@ -680,6 +681,7 @@ CurlSession::CurlSession(uno::Reference<uno::XComponentContext> xContext, assert(rc == CURLE_OK); rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_HEADERFUNCTION, &header_callback); assert(rc == CURLE_OK); + ::InitCurl_easy(m_pCurl.get()); // tdf#149921 by default, with schannel (WNT) connection fails if revocation // lists cannot be checked; try to limit the checking to when revocation // lists can actually be retrieved (usually not the case for self-signed CA) |