验证自签名证书全过
func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
let cred = URLCredential.init(trust: challenge.protectionSpace.serverTrust!)
completionHandler(.useCredential, cred)
}
网友评论