[TIMOB-1387] XHR with self signed certificate not working since yesterday
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-27T15:51:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-30, Release 1.8.0 |
Components | iOS |
Labels | n/a |
Reporter | Marko Perutovic |
Assignee | Stephen Tramer |
Created | 2011-04-15T02:51:04.000+0000 |
Updated | 2012-02-10T00:53:20.000+0000 |
Description
Here some code. Worked fine since yesterday.
@@@xhrBOCall.onerror = BO_Call_error; xhrBOCall.onload =
BO_Call_success;
xhrBOCall.validateSecureCertificate = false;
xhrBOCall.open(strHttpMethod,strURL);
(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.
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T02:51:04.000+0000 | 1185 |
logging probably the same as #1380
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.
I tested it using the latest (nightly) build
attached a simple example to reproduce this error.
@jhaynie can you have a look at this issue?
@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.
Provided app.js demonstrates the problem. Persists, slating for 1.7.0.
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.
Tested with 1.8.0.v20110819142548 iPhone 4.3.4 iPad2 4.3.2 Motorola Xoom 3.2 Nexus One 2.2.2