Reputation: 9925
Is it possible to programmatically validate a self signed certificate in SFSafariViewController like in WKWebView with the delegate method ?
webView(_:didReceiveAuthenticationChallenge:completionHandler:)
Upvotes: 1
Views: 615
Reputation: 6705
Unfortunately, no. The only delegate is SFSafariViewControllerDelegate, which does not let you intercept SSL protocol negotiation requests. SFSafariViewController
is run out-of-process, and most things are blocked to protect the user from the calling app being able to intercept and read content.
Your only option is to install and trust the certificate out of process, either via MDM or by having the user consent to install and trust it.
Upvotes: 2