I am not sure if this is possible with the frameworks available in iOS, but thought this may be a good place for discussion.
For background see: http://www.imperialviolet.org/2011/05/04/pinning.html
We would like to be able to limit SSL communication in our application to using specified certificates, in order to eliminate the risks mentioned in the imperial violet article such as a rooted CA issuing a certificate to a rogue third party.
There's some discussion about how a similar sounding concept might be implemented here:
With the way ASIHTTPRequest is written, it doesn't seem to be entirely possible (you can't verify the certificate before data is sent to the server). I don't know if any of the NSURLConnection based approaches would allow this to be done.
Cool, also found this which may help frame the issue: