Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Issue 1270043004: Add URLRequest unit tests for HPKP violation reports (Closed)

Created:
5 years, 4 months ago by estark
Modified:
5 years, 4 months ago
Reviewers:
davidben, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, Ryan Sleevi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add URLRequest unit tests for HPKP violation reports This CL adds URLRequest unit tests for sending HPKP violation reports. The tests check that HPKP reports are sent when a URLRequest violates a previously set pin, and that reports are sent when a URLRequest violates the pins in a PKP-Report-Only header on that request. This is based on top of crrev.com/1266723003 BUG=445793 Committed: https://crrev.com/06e0dac77736300f1c675a491ca70711894fe3d4 Cr-Commit-Position: refs/heads/master@{#342450}

Patch Set 1 #

Total comments: 10

Patch Set 2 : rebase #

Patch Set 3 : davidben comments #

Patch Set 4 : move kHPKPReportUri inside OS_IOS block and closer to where it's used #

Patch Set 5 : add BaseTestServer::GetCertificate() #

Total comments: 4

Patch Set 6 : GetLocalCertificatesDir() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -7 lines) Patch
A + net/data/url_request_unittest/hpkp-headers-report-only.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A net/data/url_request_unittest/hpkp-headers-report-only.html.mock-http-headers View 1 chunk +6 lines, -0 lines 0 comments Download
M net/data/url_request_unittest/hpkp-headers.html.mock-http-headers View 1 chunk +1 line, -1 line 0 comments Download
M net/test/spawned_test_server/base_test_server.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M net/test/spawned_test_server/base_test_server.cc View 1 2 3 4 5 3 chunks +43 lines, -7 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 chunks +215 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (10 generated)
estark
David, could you please take a look? Added some additional unit tests for HPKP reports.
5 years, 4 months ago (2015-08-03 16:53:50 UTC) #2
davidben
https://codereview.chromium.org/1270043004/diff/1/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/1270043004/diff/1/net/url_request/url_request_unittest.cc#newcode5386 net/url_request/url_request_unittest.cc:5386: #if defined(OS_ANDROID) Maybe for a separate CL, but I'm ...
5 years, 4 months ago (2015-08-05 18:23:51 UTC) #3
estark
Thanks, David. https://codereview.chromium.org/1270043004/diff/1/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/1270043004/diff/1/net/url_request/url_request_unittest.cc#newcode5386 net/url_request/url_request_unittest.cc:5386: #if defined(OS_ANDROID) On 2015/08/05 18:23:51, David Benjamin ...
5 years, 4 months ago (2015-08-06 05:50:07 UTC) #4
davidben
lgtm
5 years, 4 months ago (2015-08-06 17:40:25 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270043004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270043004/40001
5 years, 4 months ago (2015-08-06 17:42:07 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/53813)
5 years, 4 months ago (2015-08-06 17:58:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270043004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270043004/60001
5 years, 4 months ago (2015-08-06 18:16:22 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/36789) win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, ...
5 years, 4 months ago (2015-08-06 18:50:22 UTC) #14
estark
So it looks like this code is problematic on Windows: base::FilePath certificate_file = ssl_options.GetCertificateFile(); scoped_refptr<X509Certificate> ...
5 years, 4 months ago (2015-08-06 19:12:00 UTC) #15
davidben
On 2015/08/06 19:12:00, estark wrote: > So it looks like this code is problematic on ...
5 years, 4 months ago (2015-08-06 21:39:35 UTC) #16
estark
On 2015/08/06 21:39:35, David Benjamin wrote: > On 2015/08/06 19:12:00, estark wrote: > > So ...
5 years, 4 months ago (2015-08-06 21:43:37 UTC) #17
davidben
On 2015/08/06 21:43:37, estark wrote: > On 2015/08/06 21:39:35, David Benjamin wrote: > > On ...
5 years, 4 months ago (2015-08-06 21:49:46 UTC) #18
estark
On 2015/08/06 21:49:46, David Benjamin wrote: > On 2015/08/06 21:43:37, estark wrote: > > On ...
5 years, 4 months ago (2015-08-06 21:51:32 UTC) #19
Ryan Sleevi
I like Option 4, fwiw :)
5 years, 4 months ago (2015-08-06 23:40:06 UTC) #21
estark
On 2015/08/06 23:40:06, Ryan Sleevi wrote: > I like Option 4, fwiw :) Option 4 ...
5 years, 4 months ago (2015-08-07 06:25:01 UTC) #22
davidben
https://codereview.chromium.org/1270043004/diff/80001/net/test/spawned_test_server/base_test_server.cc File net/test/spawned_test_server/base_test_server.cc (right): https://codereview.chromium.org/1270043004/diff/80001/net/test/spawned_test_server/base_test_server.cc#newcode340 net/test/spawned_test_server/base_test_server.cc:340: base::FilePath certificate_path(certificates_dir_); Huh. Apparently certificates_dir_ is kind of wonky. ...
5 years, 4 months ago (2015-08-07 14:50:28 UTC) #23
estark
https://codereview.chromium.org/1270043004/diff/80001/net/test/spawned_test_server/base_test_server.cc File net/test/spawned_test_server/base_test_server.cc (right): https://codereview.chromium.org/1270043004/diff/80001/net/test/spawned_test_server/base_test_server.cc#newcode340 net/test/spawned_test_server/base_test_server.cc:340: base::FilePath certificate_path(certificates_dir_); On 2015/08/07 14:50:28, David Benjamin wrote: > ...
5 years, 4 months ago (2015-08-07 18:19:14 UTC) #24
davidben
lgtm
5 years, 4 months ago (2015-08-07 18:21:53 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270043004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270043004/100001
5 years, 4 months ago (2015-08-07 18:23:20 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/96622)
5 years, 4 months ago (2015-08-07 19:44:00 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270043004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270043004/100001
5 years, 4 months ago (2015-08-07 20:17:32 UTC) #31
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 4 months ago (2015-08-07 21:56:09 UTC) #32
commit-bot: I haz the power
5 years, 4 months ago (2015-08-07 21:57:01 UTC) #33
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/06e0dac77736300f1c675a491ca70711894fe3d4
Cr-Commit-Position: refs/heads/master@{#342450}

Powered by Google App Engine
This is Rietveld 408576698