Bug 230137 - Add infrastructure to allow TLS during PCM tests
Summary: Add infrastructure to allow TLS during PCM tests
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: 2021-09-09 16:57 PDT by Alex Christensen
Modified: 2021-09-13 09:06 PDT (History)
7 users (show)

See Also:


Attachments
Patch (37.01 KB, patch)
2021-09-09 17:00 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (36.89 KB, patch)
2021-09-09 17:05 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (33.03 KB, patch)
2021-09-09 19:54 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (36.89 KB, patch)
2021-09-09 20:52 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (72.46 KB, patch)
2021-09-09 22:54 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (56.22 KB, patch)
2021-09-09 23:33 PDT, Alex Christensen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (62.04 KB, patch)
2021-09-09 23:51 PDT, Alex Christensen
wilander: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-09-09 16:57:24 PDT
Add infrastructure to allow TLS during PCM tests
Comment 1 Alex Christensen 2021-09-09 17:00:57 PDT
Created attachment 437809 [details]
Patch
Comment 2 EWS Watchlist 2021-09-09 17:01:39 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Alex Christensen 2021-09-09 17:05:45 PDT
Created attachment 437810 [details]
Patch
Comment 4 Alex Christensen 2021-09-09 19:54:29 PDT
Created attachment 437829 [details]
Patch
Comment 5 Alex Christensen 2021-09-09 20:52:11 PDT
Created attachment 437832 [details]
Patch
Comment 6 Alex Christensen 2021-09-09 22:54:18 PDT
Created attachment 437836 [details]
Patch
Comment 7 Alex Christensen 2021-09-09 23:33:55 PDT
Created attachment 437841 [details]
Patch
Comment 8 Alex Christensen 2021-09-09 23:51:20 PDT
Created attachment 437844 [details]
Patch
Comment 9 EWS 2021-09-10 08:19:54 PDT
Committed r282269 (241547@main): <https://commits.webkit.org/241547@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437844 [details].
Comment 10 Radar WebKit Bug Importer 2021-09-10 09:14:03 PDT
<rdar://problem/82975108>
Comment 11 John Wilander 2021-09-10 16:21:32 PDT
Comment on attachment 437844 [details]
Patch

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

> Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDecoder.cpp:52
> +const uint8_t* Decoder::decodeFixedLengthReference(size_t size, size_t)

Is this just testing infrastructure? If so, should we name it as such?

> Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:43
> +    if (![challenge.protectionSpace.host isEqualToString:@"127.0.0.1"]

I know we've talked several times about having these known local test server hosts statically available somewhere so we don't have to spread these stings out.

> Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:113
> +    if (allowedLocalTestServerTrust() && url.host() != "127.0.0.1")

Ditto on the host.

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:-1646
> -

Accidental?
Comment 12 Alex Christensen 2021-09-13 08:59:38 PDT
(In reply to John Wilander from comment #11)
> Comment on attachment 437844 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=437844&action=review
> 
> > Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDecoder.cpp:52
> > +const uint8_t* Decoder::decodeFixedLengthReference(size_t size, size_t)
This is used by many types to decode a DataReference.  Right now it's only used for CertificateInfo decoding in testing stuff, but its signature needs to look just like this.  It will likely be used for other things in the future.

> > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:-1646
> > -
> 
> Accidental?
Kind of.
Comment 13 John Wilander 2021-09-13 09:06:34 PDT
(In reply to Alex Christensen from comment #12)
> (In reply to John Wilander from comment #11)
> > Comment on attachment 437844 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=437844&action=review
> > 
> > > Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDecoder.cpp:52
> > > +const uint8_t* Decoder::decodeFixedLengthReference(size_t size, size_t)
> This is used by many types to decode a DataReference.  Right now it's only
> used for CertificateInfo decoding in testing stuff, but its signature needs
> to look just like this.  It will likely be used for other things in the
> future.

Yeah, that code made more sense not labeled as testing when I got to the rest of the patch. In the beginning it looked like complex, risky code added just for testing and I was worried others wouldn't know it was for testing. But then I realized it's just general encode/decode.

> > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:-1646
> > > -
> > 
> > Accidental?
> Kind of.