[TIMOB-16880] iOS: "sslerror" event for webView is not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-05-28T22:17:11.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-3.3.0 |
Reporter | Priya Agarwal |
Assignee | Sabil Rahim |
Created | 2014-04-24T11:30:35.000+0000 |
Updated | 2017-03-20T20:37:37.000+0000 |
Description
"sslerror" event for webView is not working.
Steps to reproduce:
1. Copy paste the code given below in app.js and run the app.
Actual Result:
[ERROR] : Error loading: https://certs.cac.washington.edu/CAtest/, Error: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “certs.cac.washington.edu” which could put your confidential information at risk." UserInfo=0x15568a70 {NSErrorFailingURLStringKey=https://certs.cac.washington.edu/CAtest/, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=https://certs.cac.washington.edu/CAtest/, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “certs.cac.washington.edu” which could put your confidential information at risk., NSUnderlyingError=0x15665010 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “certs.cac.washington.edu” which could put your confidential information at risk.", NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x15567f80>}
Expected Result:
Must get "sslerror" in console logs as well as the webview must be loaded with webpage same as in "https://certs.cac.washington.edu/CAtest/"
For Details please look into TIMOB-4488.
var window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
var webView = Ti.UI.createWebView({
backgroundColor:'white',
url:'https://certs.cac.washington.edu/CAtest/'
});
webView.addEventListener('sslerror', function(evt) {
Ti.API.info("sslerror");
//Comment below line to fail
webView.ignoreSslError = true;
});
window.add(webView);
window.open();
The bug is *reproducible.* Issue is still available with the sample code provided. *Test Environment:* || *Component* || *Version* || | Appcelerator Studio | 3.3.0.201405161313 | | Titanium SDK | 3.3.0.v20140520141136 | | Alloy | 1.4.0-alpha2 | | CLI | 3.3.0-alpha4 | | ACS | 1.0.14 | | NPM | 1.4.10 | | Titanium-Code-Processor | 1.1.1 | | Node-ACS | 1.0.14 | | OS | OS X 10.9.2 | | Device | iPhone 5S (iOS 7.1.1) |
TIMOB-4488 exposed "sslerror" only on the android platform side. Read doc : https://github.com/appcelerator/titanium_mobile/pull/5224/files#diff-2 This is not a bug. Marking as Invalid.
Closing ticket as invalid.