I am requesting some data from a server with NSString#stringWithContentsOfURL:
. The server is using a self-signed certificate, so stringWithContentsOfURL:
simply returns nil and does not give a change to accept the certificate.
This is all expected behaviour. I know how to properly do this with NSURLConnection
and it's delegate methods instead, but I am looking for a shorter term fix instead of rewriting this code. (Yay deadlines)
So my question is, is it possible to import the self-signed certificate into the application's keychain, and will that cause stringWithContentsOfURL:
to accept the self-signed certificate?