Bug 145886 - Make -[WKWebView _certificateChain] public.
Summary: Make -[WKWebView _certificateChain] public.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-06-11 11:09 PDT by Eugene But
Modified: 2015-06-23 09:47 PDT (History)
4 users (show)

See Also:


Attachments
Add a certificateChain property to WKWebView (17.12 KB, patch)
2015-06-20 16:16 PDT, mitz
sam: review+
Details | Formatted Diff | Diff
Add a certificateChain property to WKWebView (16.71 KB, patch)
2015-06-21 09:46 PDT, mitz
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene But 2015-06-11 11:09:29 PDT
Making _certificateChain API public will simplify implementation of security UI (https lock) for web browsers.

In WebKit nightly build webView:didReceiveAuthenticationChallenge:completionHandler: provides certs chain.
However it is not called on every navigation. It means that if app needs to know
the certs of current page it has to maintain persistent cache: host-name: cert-chain.

The certs are already cached by WebKit, so storing this cache twice is additional overhead.

rdar://21342465
Comment 1 Eugene But 2015-06-12 13:05:30 PDT
webView:didReceiveAuthenticationChallenge:completionHandler: does not provide information about the frame which loads a resource. Hence caching certs, so they can be reused later for lock icon is not viable.

Without certificateChain public API correct implementation of security lock is not possible.
Comment 2 mitz 2015-06-20 16:16:58 PDT
Created attachment 255301 [details]
Add a certificateChain property to WKWebView
Comment 3 mitz 2015-06-21 09:46:55 PDT
Created attachment 255327 [details]
Add a certificateChain property to WKWebView

Revised to make the property non-nullable
Comment 4 mitz 2015-06-23 09:47:21 PDT
Fixed in <http://trac.webkit.org/r185876>.