WKWebView should ask WKNavigationDelegate about bad ssl certificates
[WebKit-https.git] / Tools / MiniBrowser / mac / WK2BrowserWindowController.m
index eeb1510..3806a34 100644 (file)
@@ -567,6 +567,12 @@ static NSSet *dataTypes()
     LOG(@"didFinishLoadingNavigation: %@", navigation);
 }
 
+- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *__nullable credential))completionHandler
+{
+    LOG(@"didReceiveAuthenticationChallenge: %@", challenge);
+    completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil);
+}
+
 - (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error
 {
     LOG(@"didFailNavigation: %@, error %@", navigation, error);