Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(20)

Issue 1378613004: Set Token-Binding HTTP header (Closed)

Created:
5 years ago by nharper
Modified:
4 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set Token-Binding HTTP header Adds a new method to SSLClientSocket to get the Token Binding from an SSL connection where Token Binding was negotiated, and uses that to add the Set-Token-Binding HTTP header (only when Token Binding was negotiated). BUG=467312 Committed: https://crrev.com/b7441ef2effe86324798710a82d8a006f5eb1395 Cr-Commit-Position: refs/heads/master@{#371347}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Fix compilation errors discovered by trybots #

Patch Set 4 : Fix msvc compilation error (again); fix memory leak when signing #

Patch Set 5 : Fix usage of ScopedEVP_MD_CTX #

Patch Set 6 : rebase #

Total comments: 6

Patch Set 7 : Minor changes #

Total comments: 1

Patch Set 8 : Major changes: add commandline switch; do key lookup in HttpNetworkTransaction, add tests #

Patch Set 9 : Remove extra SHA256 from signing #

Patch Set 10 : update to match change to SSLConfig in dependent patchset #

Patch Set 11 : rebase #

Patch Set 12 : Add UMA logging of Token Binding support and NetLog event for Token Binding key lookup #

Total comments: 66

Patch Set 13 : rebase #

Patch Set 14 : reply to comments #

Patch Set 15 : rebase #

Patch Set 16 : rebase #

Patch Set 17 : fix build issues #

Total comments: 30

Patch Set 18 : rebase #

Patch Set 19 : address comments #

Patch Set 20 : Add #if !defined(OS_IOS) to a unittest #

Patch Set 21 : Add another #if !defined(OS_IOS) #

Total comments: 16

Patch Set 22 : fix nits #

Patch Set 23 : Remove sequence numbers from mock reads #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1029 lines, -80 lines) Patch
M chrome/browser/extensions/api/socket/tls_socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/io_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +6 lines, -2 lines 2 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M net/http/http_basic_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -0 lines 0 comments Download
M net/http/http_basic_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_network_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_network_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M net/http/http_network_transaction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +19 lines, -1 line 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 10 chunks +110 lines, -3 lines 0 comments Download
M net/http/http_network_transaction_ssl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +68 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +50 lines, -0 lines 0 comments Download
M net/http/http_request_headers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M net/http/http_request_headers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M net/http/http_response_body_drainer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +12 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_stream_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -0 lines 0 comments Download
M net/http/http_stream_parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +12 lines, -0 lines 0 comments Download
M net/http/proxy_connect_redirect_http_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/proxy_connect_redirect_http_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -0 lines 0 comments Download
M net/log/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M net/net_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M net/quic/quic_http_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M net/quic/quic_http_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +6 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +6 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +17 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_nss.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +7 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +42 lines, -0 lines 0 comments Download
M net/spdy/spdy_http_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M net/spdy/spdy_http_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +11 lines, -0 lines 0 comments Download
M net/spdy/spdy_test_util_common.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M net/spdy/spdy_test_util_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -0 lines 0 comments Download
A net/ssl/token_binding.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +94 lines, -0 lines 0 comments Download
A net/ssl/token_binding_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +39 lines, -0 lines 0 comments Download
A net/ssl/token_binding_openssl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +147 lines, -0 lines 0 comments Download
M net/tools/testserver/testserver.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +16 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +6 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +136 lines, -70 lines 0 comments Download
M net/websockets/websocket_basic_handshake_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M net/websockets/websocket_basic_handshake_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/tlslite/README.chromium View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/tlslite/patches/exported_keying_material.patch View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +56 lines, -0 lines 0 comments Download
A third_party/tlslite/patches/token_binding_resumption.patch View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/tlslite/tlslite/tlsconnection.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +31 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 73 (19 generated)
nharper
Fix usage of ScopedEVP_MD_CTX
5 years ago (2015-09-30 21:53:33 UTC) #1
nharper
rebase
5 years ago (2015-09-30 22:18:40 UTC) #2
nharper
This is dependent on https://chromiumcodereview.appspot.com/1360633002/.
5 years ago (2015-09-30 22:47:27 UTC) #4
mattm
Is it possible to add tests? (note: this is just comments from a first pass.) ...
5 years ago (2015-10-01 01:53:01 UTC) #5
nharper
Minor changes
5 years ago (2015-10-01 20:25:18 UTC) #6
nharper
> Is it possible to add tests? I knew I forgot something. I'm working on ...
5 years ago (2015-10-01 20:25:47 UTC) #7
Ryan Sleevi
As discussed in person, going to sit on this until we get some of the ...
5 years ago (2015-10-01 23:44:25 UTC) #8
davidben
(Reviewing the other CL now and not doing a full review here yet. This just ...
5 years ago (2015-10-15 20:37:17 UTC) #9
nharper
Add missing tlslite patch
4 years, 12 months ago (2015-10-31 01:23:45 UTC) #10
nharper
Major changes: add commandline switch; do key lookup in HttpNetworkTransaction, add tests
4 years, 12 months ago (2015-10-31 01:27:09 UTC) #11
nharper
Major changes: add commandline switch; do key lookup in HttpNetworkTransaction, add tests
4 years, 12 months ago (2015-10-31 01:29:37 UTC) #13
nharper
Major changes: add commandline switch; do key lookup in HttpNetworkTransaction, add tests
4 years, 12 months ago (2015-10-31 01:32:07 UTC) #15
nharper
This CL has been updated and mostly rewritten. Comparing patchset 8 to previous ones probably ...
4 years, 12 months ago (2015-10-31 01:42:02 UTC) #19
nharper
Remove extra SHA256 from signing
4 years, 12 months ago (2015-11-02 17:54:46 UTC) #20
nharper
update to match change to SSLConfig in dependent patchset
4 years, 11 months ago (2015-11-04 02:59:19 UTC) #21
nharper
rebase
4 years, 11 months ago (2015-11-06 00:17:50 UTC) #22
nharper
Add UMA logging of Token Binding support and NetLog event for Token Binding key lookup
4 years, 11 months ago (2015-11-07 02:18:07 UTC) #23
davidben
(Didn't get to this today. Will look at it tomorrow.)
4 years, 11 months ago (2015-11-17 21:04:12 UTC) #24
davidben
Phew. Large CL. Here's a first pass over it. I think it's basically good as ...
4 years, 11 months ago (2015-11-18 20:49:01 UTC) #25
nharper
rebase
4 years, 11 months ago (2015-11-30 22:31:20 UTC) #26
nharper
reply to comments
4 years, 10 months ago (2015-12-04 01:42:12 UTC) #27
nharper
https://codereview.chromium.org/1378613004/diff/300001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (right): https://codereview.chromium.org/1378613004/diff/300001/chrome/common/chrome_switches.cc#newcode550 chrome/common/chrome_switches.cc:550: // handshake. On 2015/11/18 20:49:00, davidben (slow) wrote: > ...
4 years, 10 months ago (2015-12-04 01:42:21 UTC) #28
nharper
rebase
4 years, 9 months ago (2016-01-05 20:00:10 UTC) #29
nharper
rebase
4 years, 9 months ago (2016-01-14 20:19:56 UTC) #30
nharper
Fix build errors
4 years, 9 months ago (2016-01-16 00:00:13 UTC) #31
nharper
fix uint16 compile issue
4 years, 9 months ago (2016-01-16 00:17:38 UTC) #32
nharper
fix build issues
4 years, 9 months ago (2016-01-16 00:46:31 UTC) #34
nharper
fix build issues
4 years, 9 months ago (2016-01-19 19:40:17 UTC) #36
nharper
fix build issues
4 years, 9 months ago (2016-01-20 17:52:24 UTC) #37
davidben
So much plumbing. Looks good though. Just minor comments. https://codereview.chromium.org/1378613004/diff/480001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1378613004/diff/480001/net/http/http_network_transaction.cc#newcode660 net/http/http_network_transaction.cc:660: ...
4 years, 9 months ago (2016-01-22 00:19:22 UTC) #38
nharper
rebase
4 years, 9 months ago (2016-01-22 01:52:35 UTC) #41
nharper
address comments (and see what breaks on trybots)
4 years, 9 months ago (2016-01-22 02:26:56 UTC) #42
nharper
+bnc Bence, can you take a look at http_network_transaction_unittest.cc? https://codereview.chromium.org/1378613004/diff/480001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1378613004/diff/480001/net/http/http_network_transaction.cc#newcode660 net/http/http_network_transaction.cc:660: ...
4 years, 9 months ago (2016-01-22 19:36:52 UTC) #43
davidben
lgtm
4 years, 9 months ago (2016-01-22 21:28:08 UTC) #44
nharper
asargent, can you review chrome/browser/extensions? rsleevi, can you review chrome/browser/io_thread.*?
4 years, 9 months ago (2016-01-22 22:18:53 UTC) #46
asargent_no_longer_on_chrome
chrome/browser/extensions/ lgtm
4 years, 9 months ago (2016-01-23 00:08:10 UTC) #47
nharper
Add #if !defined(OS_IOS) to a unittest
4 years, 9 months ago (2016-01-23 00:34:33 UTC) #48
nharper
+mpearson to review tools/metrics/histograms/histograms.xml davidben, can you take a look at the most recent change ...
4 years, 9 months ago (2016-01-23 00:36:42 UTC) #50
nharper
Add another #if !defined(OS_IOS)
4 years, 9 months ago (2016-01-23 01:02:22 UTC) #51
Mark P
histograms.xml lgtm with minor comments below https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction.cc#newcode660 net/http/http_network_transaction.cc:660: enum { Please ...
4 years, 9 months ago (2016-01-23 05:01:49 UTC) #52
Bence
net/http/http_network_transaction_unittest.cc LGTM modulo nits. https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc#newcode25 net/http/http_network_transaction_unittest.cc:25: #include "base/strings/string_number_conversions.h" Sorry, I cannot ...
4 years, 9 months ago (2016-01-23 22:31:18 UTC) #54
nharper
fix nits
4 years, 9 months ago (2016-01-25 18:53:43 UTC) #55
nharper
https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction.cc#newcode660 net/http/http_network_transaction.cc:660: enum { On 2016/01/23 05:01:49, Mark P wrote: > ...
4 years, 9 months ago (2016-01-25 18:54:55 UTC) #56
Bence
https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc#newcode15834 net/http/http_network_transaction_unittest.cc:15834: MockRead reads[] = {CreateMockRead(*resp, 1), CreateMockRead(*body, 2), On 2016/01/25 ...
4 years, 9 months ago (2016-01-25 21:45:19 UTC) #57
nharper
R+mmenke,-sleevi for chrome/browser/io_thread*
4 years, 9 months ago (2016-01-25 21:46:07 UTC) #59
mmenke
On 2016/01/25 21:46:07, nharper wrote: > R+mmenke,-sleevi for chrome/browser/io_thread* io_thread LGTM
4 years, 9 months ago (2016-01-25 21:47:44 UTC) #60
nharper
Remove sequence numbers from mock reads
4 years, 9 months ago (2016-01-25 22:06:06 UTC) #61
nharper
https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc#newcode15834 net/http/http_network_transaction_unittest.cc:15834: MockRead reads[] = {CreateMockRead(*resp, 1), CreateMockRead(*body, 2), On 2016/01/25 ...
4 years, 9 months ago (2016-01-25 22:06:17 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1378613004/600001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1378613004/600001
4 years, 9 months ago (2016-01-25 22:07:37 UTC) #65
commit-bot: I haz the power
Committed patchset #23 (id:600001)
4 years, 9 months ago (2016-01-25 23:54:30 UTC) #67
commit-bot: I haz the power
Patchset 23 (id:??) landed as https://crrev.com/b7441ef2effe86324798710a82d8a006f5eb1395 Cr-Commit-Position: refs/heads/master@{#371347}
4 years, 9 months ago (2016-01-25 23:55:30 UTC) #69
Bence
On 2016/01/25 22:06:17, nharper wrote: > https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc > File net/http/http_network_transaction_unittest.cc (right): > > https://codereview.chromium.org/1378613004/diff/560001/net/http/http_network_transaction_unittest.cc#newcode15834 > ...
4 years, 9 months ago (2016-01-26 15:59:17 UTC) #70
Ryan Sleevi
chrome/browser/io_thread LGTM % nit (addressible in a follow-up CL/separately) https://codereview.chromium.org/1378613004/diff/600001/chrome/browser/io_thread.cc File chrome/browser/io_thread.cc (right): https://codereview.chromium.org/1378613004/diff/600001/chrome/browser/io_thread.cc#newcode850 chrome/browser/io_thread.cc:850: ...
4 years, 9 months ago (2016-01-26 22:53:47 UTC) #72
nharper
4 years, 9 months ago (2016-01-26 23:29:30 UTC) #73
Message was sent while issue was closed.
https://codereview.chromium.org/1378613004/diff/600001/chrome/browser/io_thre...
File chrome/browser/io_thread.cc (right):

https://codereview.chromium.org/1378613004/diff/600001/chrome/browser/io_thre...
chrome/browser/io_thread.cc:850: if
(command_line.HasSwitch(switches::kEnableTokenBinding)) {
On 2016/01/26 22:53:47, Ryan Sleevi wrote:
> As command-line switches are generally inaccessible on Android/ChromeOS, are
> there plans to add it to about://flags? Or via Policy? Or via Finch? Just
> exploring here.
> 
> Note that this file appears to omit braces for one-line ifs, so I think local
> style should dominate.

There is a plan to add it to about:flags - see
https://codereview.chromium.org/1409323011/. That CL also fixes this style nit.

Powered by Google App Engine
This is Rietveld 408576698