我在使用Androids WebView加载SSL安全网页时遇到问题.我总是得到如下错误:
onReceivedSslError: primary error: 3 certificate: Issued to: CN=intranet.<company>.de,C=DE,O=<company>,OU=<compay org unit>
我已经通过设置 - >安全 - >从SD卡安装,将此服务器证书链的所有证书安装到Android的钥匙串中.我甚至可以看到其中一个安装的证书完全匹配LogCat的错误输出.如果我使用默认的浏览器应用程序会更加奇怪:即使我卸载之前提到的所有证书,它也会毫无问题地加载页面.我真的没有对我怎么能解决这个问题,而不信任所有certificats任何线索通过调用handler.proceed()
中onReceivedSslError()
这是一个潜在的安全问题.任何帮助表示赞赏.谢谢!
干杯Bjoern
编辑:根证书是自签名的,因为它仅用于Intranet服务器.我认为我添加到Android可信凭证的所有证书都是可信的.
几天后,我在我的一个应用程序中看到了一个非常奇怪的行为.一添加第二个动作,UIAlertController就会崩溃.这是代码>
let alertController = UIAlertController.init(title: title, message: message, preferredStyle: .Alert)
for action in actions
{
alertController.addAction(action)
}
Run Code Online (Sandbox Code Playgroud)
actions
是一个包含UIAlertAction元素的数组,在我的情况下2.我已经尝试重新排序操作以查看特定UIAlertAction对象是否存在问题,但是不,在添加第二个操作时应用程序总是崩溃.我像这样创建它们:
let cancelAction = UIAlertAction.init(title: "Cancel", style: .Cancel)
{ (action:UIAlertAction!) -> Void in
print("User cancelled action");
}
Run Code Online (Sandbox Code Playgroud)
编辑:这是我创建数组的方式:
showAlertView("Proceed", message: proceedMessage, actions: [cancelAction, proceedAction])
Run Code Online (Sandbox Code Playgroud)
编辑结束
大多数代码来自Apple教程,几乎没有变化.调试器立即跳转到class AppDelegate: ...
没有其他信息然后SIGABRT的行,在崩溃日志中我看到:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x1832c6db0 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x18292bf80 objc_exception_throw …
Run Code Online (Sandbox Code Playgroud)