I'm developing a simple application for the iPhone which makes a post request with https protocol. This is the piece of code:
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:@"https://serverapp:8443/webapps"];
[urlRequest setHTTPMethod:@"POST"];
NSError *error = nil;
[NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil error:&error];
and I have this error:
Error happened = Error Domain=NSURLErrorDomain Code=-1202
"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “serverapp” which could put your confidential information at risk.
How can I import the certificate into my project?
Thank you for the responses, but I don't want to bypass the certificate, but I want to communicate with the server with a valid certificate that I have. It is possible to do this?