Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1387] XHR with self signed certificate not working since yesterday

GitHub Issuen/a
Resolution Date2011-10-27T15:51:09.000+0000
Affected Version/sn/a
Fix Version/sSprint 2011-30, Release 1.8.0
ReporterMarko Perutovic
AssigneeStephen Tramer


Here some code. Worked fine since yesterday.

@@@xhrBOCall.onerror = BO_Call_error; xhrBOCall.onload = BO_Call_success;
xhrBOCall.validateSecureCertificate = false;
(xhrBOCall); xhrBOCall.send(dataToSend);

It returns error:
Domain=ASIHTTPRequestErrorDomain Code=1...
which I can't copy because since today Ti.API.info not working...
I use SDK4.0.1 for iPhone.




  1. Marko Perutovic 2011-04-15

    logging probably the same as #1380

  2. Jick Steen 2011-04-15

    I've the same issue. Getting the following error on iOS:

    {"source":{},"type":"error","error":"Error Domain=ASIHTTPRequestErrorDomain Code=1 \"A connection failure occurred: SSL problem (possibly a bad/expired/self-signed certificate)\" UserInfo=0xf01f1d0 {NSUnderlyingError=0xf009780 \"The operation couldn’t be completed. (OSStatus error -9807.)\", NSLocalizedDescription=A connection failure occurred: SSL problem (possibly a bad/expired/self-signed certificate)}"}

    Used the same code as Marko:
    xhr.validateSecureCertificate = false; xhr.setTimeout(200000); xhr.open("GET",url); xhr.send({});

    This error occurs on iOS simulator and on iOS devices. It works on Android.

  3. Jick Steen 2011-04-15

    I tested it using the latest (nightly) build

  4. Jick Steen 2011-04-15

    attached a simple example to reproduce this error.

    @jhaynie can you have a look at this issue?

  5. Jick Steen 2011-04-15

    @Marco it works when setting it directly as a param on XHR creation:

    var xhr = Titanium.Network.createHTTPClient({validatesSecureCertificate: false});

    Maybe it helps you. Nevertheless it should be fixed or mentioned in documentation that this property has to be set on creation. I think it is also not disabled in Simulator as described in docs.

  6. Stephen Tramer 2011-04-15

    Provided app.js demonstrates the problem. Persists, slating for 1.7.0.

  7. Stephen Tramer 2011-07-25

    Validated that this issue is already resolved. Probably fixed in 1.7.2 but marking official fix-version as 1.8.0. Tested iPhone 4.3.3 sim (Lion)/iPod 4GT iOS 4.3.3.
  8. Natalie Huynh 2011-08-25

    Tested with 1.8.0.v20110819142548 iPhone 4.3.4 iPad2 4.3.2 Motorola Xoom 3.2 Nexus One 2.2.2

JSON Source