cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl error code 35 after Mac OS upgrade from Mountain Lion to Mavericks

From: Madhavi Gundeti <madhavi.gundeti07_at_gmail.com>
Date: Wed, 30 Jul 2014 15:19:47 +0530

Hi,

I am getting curl error 56 always on latest Yosemite
Beta(14A299I)version while trying to access my server URL from my
application.
Error Log on Yosemite:
Madhavis-Mac:~ madhavi$ curl -v https://X.X.com/6_0/commando.php
* Adding handle: conn: 0x7f87e2804800
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7f87e2804800) send_pipe: 1, recv_pipe: 0
* About to connect() to X.X.com port 443 (#0)
* Trying X.X.X.X…
* Connected to X.X.com ( X.X.X.X) port 443 (#0)
* TLS 1.0 connection using TLS_RSA_WITH_RC4_128_SHA
* Server certificate: X.X.com
* Server certificate: Thawte SSL CA
* Server certificate: thawte Primary Root CA
* Server certificate: Thawte Premium Server CA
> GET /6_0/commando.php HTTP/1.1
> User-Agent: curl/7.30.0
> Host: X.X.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: close
< Date: Tue, 29 Jul 2014 03:27:18 GMT
* Server Microsoft-IIS/6.0 is not blacklisted
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< X-Powered-By: PHP/5.2.17
< Content-type: text/html
<
* SSLRead() return error -9806
* Closing connection 0
curl: (56) SSLRead() return error -9806
|response|-Invalid Command:
<BR>|sid|8c6d0993a49b74f64d35f5aa732a865e<BR>Madhavis-Mac:~ madhavi$

I submitted apple bug like below.

My application is working without any issues on Mavericks and Mountain Lion.

But After software upgrades from Mountain Lion to Mavericks then I am
getting curl 35 error. And on Latest Yosemite Beta version fresh
install itself failing with curl 56 error.

Fresh install of my application on Mac OS X is working fine for
Mavericks and Mountain lion.
But below scenario again I am seeing the curl errors.

1. Install my application on Mountain Lion(No curl issues)
2. Upgrade Mountain Lion to Mavericks.(curl error 35)

Expected Results:
No curl issues in prior versions of Mac OS X. Even in latest Mac OS X
also my application should work as it is.

Actual Results:
curl error 56 on Yosemite Beta version
curl error 35 after OS upgrades.

Version:
OS X Yosemite(14A299I)
OS X mavericks

I added the latest version of libcurl and libssl and libcrypto to my
project and tested .. still same problem I am facing.

Please let me know how to fix this curl issues on Mac OS X.

Thanks and Regards,
Madhavi G.

On Tue, Jun 24, 2014 at 4:13 PM, Madhavi Gundeti <
madhavi.gundeti07_at_gmail.com> wrote:

> Hi,
>
>
>
> I am getting curl errors 35 and 28 continuously for my application after
> upgrading the Mac OS from Mountain Lion to Mavericks.
>
> If I freshly install my application on Mavericks then no SSL errors. Only
> during upgrades I am seeing these errors.
>
>
>
> I found info regarding this at below URL.
>
> http://curl.haxx.se/mail/archive-2013-10/0036.html#start
>
> But how to build our own curl? It will be great help if you provide some
> examples.
>
>
> I found one temporary solution which is working 70%(means not working all
> the time) adding SSLv3 version to the curl request.
>
>
>
> My Application Sample Code:
>
> CURLcode res;
>
> FILE *f = 0;
>
> const std::string& url = // Here the server URL;
>
> f = fopen(m_OutputFilename.c_str(), "w");
>
> if(!f)
>
> return false;
>
> char cError[CURL_ERROR_SIZE]="";
>
> curl_easy_setopt (m_pCURL, CURLOPT_ERRORBUFFER, &cError );
>
> curl_easy_setopt(m_pCURL, CURLOPT_TIMEOUT, 30); // 30 seconds time limit
>
> curl_easy_setopt(m_pCURL, CURLOPT_URL, url.c_str());
>
> curl_easy_setopt(m_pCURL, CURLOPT_USERAGENT, s_UserAgent.c_str());
>
> curl_easy_setopt(m_pCURL, CURLOPT_HTTPPOST, form.GetForm());
>
> curl_easy_setopt(m_pCURL, CURLOPT_NOSIGNAL, 1);
>
>
> if(f)
>
> {
>
> curl_easy_setopt(m_pCURL, CURLOPT_WRITEFUNCTION,
> CWebRequest::CURLWriteCallback);
>
> curl_easy_setopt(m_pCURL, CURLOPT_FILE, f);
>
> }
>
> curl_easy_setopt(m_pCURL, CURLOPT_SSLVERSION, 3); //Added for OS upgrade
> bug fix.
>
>
> res = curl_easy_perform(m_pCURL);
>
> MessageLog.Write("cURL return code", res);
>
> MessageLog.Write("Error Message", cError);
>
>
> // Below loop added because after 7th attempt curl call succeeded(This
> is inconsistent).
>
> if(res != 0)
>
> {
>
> int count1 = 0;
>
> while (count1 < 10)
>
> {
>
> res = curl_easy_perform(m_pCURL);
>
> MessageLog.Write("cURL return code", res);
>
> MessageLog.Write("Error Message", cError);
>
> if(res == 0)
>
> break;
>
> count1++;
>
> }
>
> }
>
>
> Error Log:
>
> Adding handle: conn: 0x180a000
>
> , 0000000031 bytes (0x0000001f)
>
> 0000: Adding handle: conn: 0x180a000.
>
> Adding handle: send: 0
>
> , 0000000023 bytes (0x00000017)
>
> 0000: Adding handle: send: 0.
>
> Adding handle: recv: 0
>
> , 0000000023 bytes (0x00000017)
>
> 0000: Adding handle: recv: 0.
>
> Curl_addHandleToPipeline: length: 1
>
> , 0000000036 bytes (0x00000024)
>
> 0000: Curl_addHandleToPipeline: length: 1.
>
> - Conn 0 (0x180a000) send_pipe: 1, recv_pipe: 0
>
> , 0000000048 bytes (0x00000030)
>
> 0000: - Conn 0 (0x180a000) send_pipe: 1, recv_pipe: 0.
>
> About to connect() to SERVER port 443 (#0)
>
> , 0000000060 bytes (0x0000003c)
>
> 0000: About to connect() to SERVER port 443 (#0).
>
> Trying X.X.X.X...
>
> , 0000000025 bytes (0x00000019)
>
> 0000: Trying X.X.X.X....
>
> Connected to SERVER (X.X.X.X) port 443 (#0)
>
> , 0000000066 bytes (0x00000042)
>
> 0000: Connected to SERVER (X.X.X.X) port 443 (#0).
>
> Unknown SSL protocol error in connection to SERVER:-36
>
> , 0000000072 bytes (0x00000048)
>
> 0000: Unknown SSL protocol error in connection to SERVER:-36.
>
>
>
>
> Please suggest me how to solve this SSL issue permanently.
>
>
> Thanks and Regards,
> Madhavi G.
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-30