Reputation: 715
I am making an app to login to an aspx website over HTTPS by passing login credentials in a post method. When checking the response using Charles Proxy I can see a SSL Handshake failed error from seal.verisign.com, I am then taken back to the login page. I am not sure what I need to do to solve this issue.
I am testing this in the iPhone simulator.
I do not have access to the server implementation.
Any ideas?
Thank you!
Upvotes: 41
Views: 40720
Reputation: 1810
If running on the simulator, just restart both Charles Proxy and the simulator, making sure Charles Proxy starts first
Upvotes: 0
Reputation: 16122
On iOS >= 10.3, after installing the Charles Proxy certificate (as per @ashish-verma's excellent answer), you also need to enable it through Settings -> General -> About -> Certificate Trust Settings:
Full setup here: http://www.devsbedevin.net/debugging-ios-ssl-traffic/
Upvotes: 155
Reputation: 391
Remove all old user credentials, then Re-Install new ssl certificate.
Upvotes: 0
Reputation: 1488
If installing the certificate still doesn't help you, then it may be due to SSL Pinning.
From charlesproxy.com:
SSL Pinning Note that some apps implement SSL certificate pinning which means they specifically validate the root certificate. Because the app is itself verifying the root certificate it will not accept Charles's certificate and will fail the connection. If you have successfully installed the Charles root SSL certificate and can browse SSL websites using SSL Proxying in Safari, but an app fails, then SSL Pinning is probably the issue.
Upvotes: 19
Reputation: 1818
You need to install SSL certificate to resolve this issue.
Follow these steps
Open Safari browser on iOS Simulator
Type "www.charlesproxy.com/getssl" in address bar
Upvotes: 3
Reputation: 1
You have to install SSL certificate on mobile device.
Search online for how to install SSL certificate for Charles Proxy.
Upvotes: 0
Reputation: 3583
Perhaps testing on an actual device will give more insight?
To do that in Charles:
On your dev machine:
On your iDevice:
Finally:
More Info at Charles's site: http://www.charlesproxy.com/documentation/proxying/ssl-proxying/
Also, are you getting a response to the connection:(NSURLConnection*)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge method?
Upvotes: 15
Reputation: 1284
It is possible that the server doesn't have a valid certificate for the url you are using. Did you check that?
If you try the url using a browser, does it give you a warning?
Upvotes: 1