iOS 6上的UIWebView和客户端证书

Dag*_*gum 8 ssl uiwebview ios

我正在尝试通过UIWebView浏览安全的网站(使用客户端证书).我正在使用此示例:UIWebView iOS中的客户端证书身份验证

它似乎不适用于iOS 6.我设法处理服务器信任,但UIWebView似乎忽略了客户端证书.即使我设法使用ASIHTTPRequest和身份连接到服务器.

UIWebViewDelegate中引发以下错误:

webView didFailLoadWithError :-1206 The server “xxx.yyy” requires a client certificate.`
Run Code Online (Sandbox Code Playgroud)

我使用该标志NSURLCredentialPersistenceForSessionNSURLCredential.

ker*_*ich 0

您提供的链接包含该问题的正确解决方案。只需确保将客户端证书添加到应用程序包中(Build Phases->Copy Bundle Resources in Xcode)