我们正在测试我们的应用程序正在生产中,而今天我们遇到了一个问题“此服务器的证书无效,您可能正在连接到假装为”server.name“的服务器,当被问到对于这可能会危害您的机密信息。服务器信任问题在生产环境中
我们使用了HTTPS和SSL证书也是有效的连接。
这种情况的发生只有一些时间和不可再生始终。
从客户端NSURLAuthenticationMethodServerTrust
,canAuthenticateAgainstProtectionSpace:
正在退回NO。
然后被记录在
- (void)connection:(NSURLConnection *)connection
didFailWithError:(NSError *)error
{
NSLog(@"Connection failed! Error - %@ %@",
[error localizedDescription],
[[error userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey]);
}
错误记录以下错误:
Connection failed! Error - The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server.name” which could put your confidential information at risk.
服务器证书由COMODO高保障的安全服务器CA颁发。
也许你正在断断续续MITMed! – 2013-03-10 21:16:22