How to make iPhone application accept incorrect server certificate but only specific one?
Posted
by Igor Romanov
on Stack Overflow
See other posts from Stack Overflow
or by Igor Romanov
Published on 2010-04-20T14:11:21Z
Indexed on
2010/04/20
14:13 UTC
Read the original article
Hit count: 304
I need to work with private HTTPS API and client has incorrect certificate on the host. Certificate is for 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 www.clienthost.com and not something else. I found this answer: http://stackoverflow.com/questions/933331/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.
© Stack Overflow or respective owner