我們正在測試我們的應用程序正在生產中,而今天我們遇到了一個問題「此服務器的證書無效,您可能正在連接到假裝爲」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