From 66c95af0933953bcd2c6ea04c5b6e5682654d403 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 14 Jul 2012 20:57:55 +0200 Subject: [PATCH] Possible fix for "No able to connect to SecondLife" --- indra/llmessage/llcurl.cpp | 3 +++ indra/llmessage/llhttpclient.cpp | 3 +++ indra/llmessage/llurlrequest.cpp | 3 +++ indra/newview/hipporestrequest.cpp | 3 +++ indra/newview/llxmlrpctransaction.cpp | 3 +++ 5 files changed, 15 insertions(+) diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 0f46d2810..20f68fae7 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -501,6 +501,9 @@ void LLCurl::Easy::prepRequest(const std::string& url, if (post) setoptString(CURLOPT_ENCODING, ""); //setopt(CURLOPT_VERBOSE, 1); // useful for debugging +#ifndef CURLTHREADING_BRANCH + setopt(CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1); +#endif setopt(CURLOPT_NOSIGNAL, 1); // Set the CURL options for either Socks or HTTP proxy diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 037688906..797393de1 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -441,6 +441,9 @@ static LLSD blocking_request( LLProxy::getInstance()->applyProxySettings(curlp); // * Set curl handle options +#ifndef CURLTHREADING_BRANCH + curl_easy_setopt(curlp, CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1); +#endif curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts curl_easy_setopt(curlp, CURLOPT_TIMEOUT, timeout); // seconds, see warning at top of function. curl_easy_setopt(curlp, CURLOPT_WRITEFUNCTION, LLHTTPBuffer::curl_write); diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index f5e08f393..6e470e0bc 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -471,6 +471,9 @@ void LLURLRequest::initialize() return ; } +#ifndef CURLTHREADING_BRANCH + mDetail->mCurlRequest->setopt(CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1); +#endif mDetail->mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mDetail->mCurlRequest->setWriteCallback(&downCallback, (void*)this); mDetail->mCurlRequest->setReadCallback(&upCallback, (void*)this); diff --git a/indra/newview/hipporestrequest.cpp b/indra/newview/hipporestrequest.cpp index 7b64b35d8..85efee479 100644 --- a/indra/newview/hipporestrequest.cpp +++ b/indra/newview/hipporestrequest.cpp @@ -325,6 +325,9 @@ int HippoRestRequest::getBlocking(const std::string &url, std::string *result) char curlErrorBuffer[CURL_ERROR_SIZE]; CURL* curlp = curl_easy_init(); +#ifndef CURLTHREADING_BRANCH + curl_easy_setopt(curlp, CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1); +#endif curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts curl_easy_setopt(curlp, CURLOPT_TIMEOUT, 5); // seconds curl_easy_setopt(curlp, CURLOPT_CAINFO, gDirUtilp->getCAFile().c_str()); diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index af5e977b2..1642f8bc7 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -240,6 +240,9 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) LLProxy::getInstance()->applyProxySettings(mCurlRequest); // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging +#ifndef CURLTHREADING_BRANCH + mCurlRequest->setopt(CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1); +#endif mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this); BOOL vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert");