I need to work with private HTTPS API and client has incorrect certificate on the host.
Certificate is for http://www.clienthost.com and I’m working with api.clienthost.com.
So I need to connect via HTTPS to api.clienthost.com ignoring incorrect certificate but still make sure it is the one for http://www.clienthost.com and not something else.
I found this answer: How to use NSURLConnection to connect with SSL for an untrusted cert? and it seems to solve half of my problem but I’m trying to figure out how to still check certificate for host is one I expect to see and not different.
I need to work with private HTTPS API and client has incorrect certificate on
Share
Try implementing the delegate method for NSURLConnection
Then the following will contain the host
You can then proceed by calling one of the following