在iphone上实现https链接,post xml数据并接受返回的xml数据,用了NSMutableRequest NSURLConnection建立链接,但是有错误信息提示:NSURLErrorDomain error -1012 The certificate for this server is invalid. You might be connecting to a server that is pretending to be \U201c10.0.132.201\U201d which could put your confidential information at risk。链接的服务器是我自己配置的https服务器。
哪位大大知道,路过给点建议和解决方法,谢谢。
哪位大大知道,路过给点建议和解决方法,谢谢。
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
在函数中写上
if ([error code] != -1012) {
return;
}我自己没有试验环境,如果这个办法可行,请告知我,多谢!
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
这两个delegate method。