Bug 210626 - NetworkSessionCocoa should request client certificate only once per host/port
Summary: NetworkSessionCocoa should request client certificate only once per host/port
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-16 16:18 PDT by Alex Christensen
Modified: 2020-04-17 16:41 PDT (History)
2 users (show)

See Also:


Attachments
Patch (9.04 KB, patch)
2020-04-16 16:24 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (16.33 KB, patch)
2020-04-16 19:28 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (20.21 KB, patch)
2020-04-17 12:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.81 KB, patch)
2020-04-17 13:08 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.93 KB, patch)
2020-04-17 13:59 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.90 KB, patch)
2020-04-17 15:32 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.92 KB, patch)
2020-04-17 15:53 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (20.23 KB, patch)
2020-04-17 16:24 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-04-16 16:18:47 PDT
NetworkSessionCocoa should request client certificate only once per host/port
Comment 1 Alex Christensen 2020-04-16 16:24:26 PDT
Created attachment 396718 [details]
Patch
Comment 2 Alex Christensen 2020-04-16 16:24:37 PDT
<rdar://problem/60340449>
Comment 3 Alex Christensen 2020-04-16 19:28:55 PDT
Created attachment 396735 [details]
Patch
Comment 4 Alex Christensen 2020-04-17 12:17:28 PDT
Created attachment 396781 [details]
Patch
Comment 5 Alex Christensen 2020-04-17 13:08:22 PDT
Created attachment 396787 [details]
Patch
Comment 6 Alex Christensen 2020-04-17 13:59:05 PDT
Created attachment 396794 [details]
Patch
Comment 7 Geoffrey Garen 2020-04-17 14:11:55 PDT
Comment on attachment 396794 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396794&action=review

r=me

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h:161
> +    HashMap<std::pair<String, uint16_t>, RetainPtr<NSURLCredential>> m_successfulClientCertificates;

Can we give a name to "std::pair<String, uint16_t>", and maybe use it in SuggestedClientCertificate too? Something like "Server" or "Endpoint" or just "HostAndPort". Maybe just make it a struct rather than a pair.

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1037
> +    if (UNLIKELY(!m_suggestedClientCertificates.isEmpty())) {

Can be an early return to reduce nesting.
Comment 8 Alex Christensen 2020-04-17 15:32:40 PDT
Created attachment 396809 [details]
Patch
Comment 9 Alex Christensen 2020-04-17 15:53:18 PDT
Created attachment 396811 [details]
Patch
Comment 10 Alex Christensen 2020-04-17 16:24:44 PDT
Created attachment 396815 [details]
Patch
Comment 11 Alex Christensen 2020-04-17 16:41:43 PDT
http://trac.webkit.org/r260302