“SSL证书不可信”。对话框出现在Adobe AIR应用程序中。 如何在发生这种情况之前检测到这种情况? (其实我想我的应用程序,以绕过警告...)在Adobe AIR中显示消息之前,如何绕过或检测SSL证书?
请检查下面的代码:
var request:URLRequest = new URLRequest('http://bit.ly/dzKg2q');
request.followRedirects = true;
request.manageCookies = true;
request.useCache = true;
request.authenticate = false; // I set this as true, but it does not work either.
var loader:URLLoader = new URLLoader;
loader.addEventListener(Event.COMPLETE, function(event:Event):void {
trace('COMPLETE');
});
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(event:Event):void {
trace('SECURITY_ERROR');
});
loader.addEventListener(IOErrorEvent.IO_ERROR, function(event:Event):void {
trace('IO_ERROR');
});
try{
loader.load(request);
}catch(e:SecurityError) {
trace(e);
}
非常感谢您的关注!
我怀疑这甚至是可能的。这不会破坏首先有安全感的目的吗? – DMKing 2010-11-01 19:50:40
确实。绕过警告的唯一方法是将其设置为可信证书。您可以通过在受信任证书列表中安装站点的证书来完成此操作。 – Pace 2010-11-02 03:11:14