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

Issue 2163683003: Relanding: Allow the DTLS fingerprint verification to occur after the handshake. (Closed)

Created:
4 years, 5 months ago by Taylor Brandstetter
Modified:
4 years, 2 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Relanding: Allow the DTLS fingerprint verification to occur after the handshake. This means the DTLS handshake can make progress while the SDP answer containing the fingerprint is still in transit. If the signaling path if significantly slower than the media path, this can have a moderate impact on call setup time. Of course, until the fingerprint is verified no media can be sent. Any attempted write will result in SR_BLOCK. This essentially fulfills the requirements of RFC 4572, Section 6.2: Note that when the offer/answer model is being used, it is possible for a media connection to outrace the answer back to the offerer. Thus, if the offerer has offered a 'setup:passive' or 'setup:actpass' role, it MUST (as specified in RFC 4145 [2]) begin listening for an incoming connection as soon as it sends its offer. However, it MUST NOT assume that the data transmitted over the TLS connection is valid until it has received a matching fingerprint in an SDP answer. If the fingerprint, once it arrives, does not match the client's certificate, the server endpoint MUST terminate the media connection with a bad_certificate error, as stated in the previous paragraph. BUG=webrtc:6387 Committed: https://crrev.com/89824f6fe05b43876550812c35195cf0f1237ccc Cr-Commit-Position: refs/heads/master@{#14461}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fixing comment line wrapping. #

Total comments: 20

Patch Set 3 : Code cleanup based on comments from Matt. Setting DTLS state to "failed" on bad fingerprint. #

Total comments: 23

Patch Set 4 : Responding to second round of comments. #

Patch Set 5 : Responding to Peter's comments. #

Total comments: 21

Patch Set 6 : Adding a bunch more tests, wiring up fatal alerts. #

Patch Set 7 : Removing files that were caught by "git merge master" and "git cl format". #

Patch Set 8 : . #

Patch Set 9 : Merge with master. #

Patch Set 10 : Getting rid of obsolete unit test (someone else added tests). #

Patch Set 11 : Rename "NO_ERROR" to "NONE", since "NO_ERROR" is a Windows #define... #

Patch Set 12 : Making SetPeerCertificateDigest's new signature backwards compatible. Also adding unit tests. #

Total comments: 6

Patch Set 13 : Fix name of method. #

Patch Set 14 : Fixing comment grammar. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+601 lines, -212 lines) Patch
M webrtc/base/opensslstreamadapter.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +24 lines, -9 lines 0 comments Download
M webrtc/base/opensslstreamadapter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 26 chunks +163 lines, -92 lines 0 comments Download
M webrtc/base/sslstreamadapter.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +20 lines, -3 lines 0 comments Download
M webrtc/base/sslstreamadapter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +132 lines, -20 lines 0 comments Download
M webrtc/p2p/base/dtlstransportchannel.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -1 line 0 comments Download
M webrtc/p2p/base/dtlstransportchannel.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +52 lines, -6 lines 0 comments Download
M webrtc/p2p/base/dtlstransportchannel_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 13 chunks +194 lines, -80 lines 0 comments Download
M webrtc/p2p/base/faketransportcontroller.h View 1 2 3 4 5 6 7 8 6 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 56 (24 generated)
Taylor Brandstetter
Peter: Please take a look. Matt: I realize you're unfamiliar with this code, but I ...
4 years, 5 months ago (2016-07-19 23:43:06 UTC) #2
mattdr-at-webrtc.org
https://codereview.webrtc.org/2163683003/diff/20001/webrtc/base/opensslstreamadapter.cc File webrtc/base/opensslstreamadapter.cc (right): https://codereview.webrtc.org/2163683003/diff/20001/webrtc/base/opensslstreamadapter.cc#newcode340 webrtc/base/opensslstreamadapter.cc:340: Error("SetPeerCertificateDigest", -1, false); instead of -1, X509_V_ERR_CERT_UNTRUSTED might be ...
4 years, 5 months ago (2016-07-20 00:50:27 UTC) #3
Taylor Brandstetter
Many thanks for the prompt and valuable feedback! By the way, so I don't forget, ...
4 years, 5 months ago (2016-07-20 17:36:52 UTC) #4
Taylor Brandstetter
4 years, 5 months ago (2016-07-20 17:37:38 UTC) #6
Taylor Brandstetter
On 2016/07/20 17:37:38, Taylor Brandstetter wrote: Hmm, guess you can't do "not lgtm" on your ...
4 years, 5 months ago (2016-07-20 17:38:30 UTC) #7
mattdr-at-webrtc.org
Partial comments for the next pass. https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.h File webrtc/base/opensslstreamadapter.h (right): https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.h#newcode138 webrtc/base/opensslstreamadapter.h:138: enum SSLTopology { ...
4 years, 5 months ago (2016-07-21 08:04:24 UTC) #8
Taylor Brandstetter
https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.h File webrtc/base/opensslstreamadapter.h (right): https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.h#newcode138 webrtc/base/opensslstreamadapter.h:138: enum SSLTopology { On 2016/07/21 08:04:23, mattdr-at-webrtc.org wrote: > ...
4 years, 5 months ago (2016-07-22 18:52:20 UTC) #9
pthatcher1
More comments to come. https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.cc File webrtc/base/opensslstreamadapter.cc (right): https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.cc#newcode318 webrtc/base/opensslstreamadapter.cc:318: ASSERT(topology_ != TOPOLOGY_CLIENT_SERVER); Should we ...
4 years, 5 months ago (2016-07-22 18:58:27 UTC) #10
Taylor Brandstetter
Responded to comments. Note that I'm still adding unit tests for "bad fingerprint received after ...
4 years, 5 months ago (2016-07-25 23:54:54 UTC) #12
mattdr-at-webrtc.org
On 2016/07/25 23:54:54, Taylor Brandstetter wrote: > Responded to comments. > > Note that I'm ...
4 years, 5 months ago (2016-07-26 00:03:36 UTC) #13
pthatcher1
https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.cc File webrtc/base/opensslstreamadapter.cc (right): https://codereview.webrtc.org/2163683003/diff/40001/webrtc/base/opensslstreamadapter.cc#newcode318 webrtc/base/opensslstreamadapter.cc:318: ASSERT(topology_ != TOPOLOGY_CLIENT_SERVER); On 2016/07/25 23:54:53, Taylor Brandstetter wrote: ...
4 years, 4 months ago (2016-07-27 19:32:36 UTC) #14
Taylor Brandstetter
I finally got around to updating this CL. Main changes are: * Started sending the ...
4 years, 4 months ago (2016-08-13 00:09:53 UTC) #16
pthatcher1
On 2016/08/13 00:09:53, Taylor Brandstetter wrote: > I finally got around to updating this CL. ...
4 years, 4 months ago (2016-08-23 00:25:54 UTC) #17
Taylor Brandstetter
On 2016/08/23 00:25:54, pthatcher1 wrote: > On 2016/08/13 00:09:53, Taylor Brandstetter wrote: > > I ...
4 years, 4 months ago (2016-08-23 00:40:30 UTC) #18
pthatcher1
lgtm Sorry, I thought your comment meant you had more to do.
4 years, 4 months ago (2016-08-23 01:00:20 UTC) #19
mattdr-at-webrtc.org
lgtm
4 years, 3 months ago (2016-09-10 21:07:16 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2163683003/160001
4 years, 3 months ago (2016-09-19 17:53:19 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: win_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_baremetal/builds/14393) win_x64_clang_dbg on master.tryserver.webrtc (JOB_FAILED, ...
4 years, 3 months ago (2016-09-19 17:57:27 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2163683003/200001
4 years, 3 months ago (2016-09-19 20:55:21 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 3 months ago (2016-09-19 22:55:59 UTC) #31
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/042041bf9585f92e962387c59ca805f1218338f9 Cr-Commit-Position: refs/heads/master@{#14296}
4 years, 3 months ago (2016-09-19 23:02:41 UTC) #34
Taylor Brandstetter
Committed patchset #11 (id:200001) manually as 042041bf9585f92e962387c59ca805f1218338f9 (presubmit successful).
4 years, 3 months ago (2016-09-19 23:02:41 UTC) #35
Taylor Brandstetter
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.webrtc.org/2352863003/ by deadbeef@webrtc.org. ...
4 years, 3 months ago (2016-09-20 00:20:34 UTC) #36
Taylor Brandstetter
Would like a review of the final patchset. I'm making the error enum an optional ...
4 years, 2 months ago (2016-09-28 23:12:16 UTC) #40
skvlad
I like the tests! https://codereview.webrtc.org/2163683003/diff/220001/webrtc/base/opensslstreamadapter.cc File webrtc/base/opensslstreamadapter.cc (right): https://codereview.webrtc.org/2163683003/diff/220001/webrtc/base/opensslstreamadapter.cc#newcode1146 webrtc/base/opensslstreamadapter.cc:1146: return 1; Just to be ...
4 years, 2 months ago (2016-09-29 20:56:29 UTC) #42
skvlad
lgtm
4 years, 2 months ago (2016-09-29 20:56:42 UTC) #43
Taylor Brandstetter
https://codereview.webrtc.org/2163683003/diff/220001/webrtc/base/opensslstreamadapter.cc File webrtc/base/opensslstreamadapter.cc (right): https://codereview.webrtc.org/2163683003/diff/220001/webrtc/base/opensslstreamadapter.cc#newcode1146 webrtc/base/opensslstreamadapter.cc:1146: return 1; On 2016/09/29 20:56:29, skvlad wrote: > Just ...
4 years, 2 months ago (2016-09-29 21:37:28 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2163683003/260001
4 years, 2 months ago (2016-09-29 21:51:06 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 2 months ago (2016-09-29 23:51:49 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2163683003/260001
4 years, 2 months ago (2016-09-30 18:50:53 UTC) #52
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 2 months ago (2016-09-30 18:55:49 UTC) #54
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 18:55:58 UTC) #56
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/89824f6fe05b43876550812c35195cf0f1237ccc
Cr-Commit-Position: refs/heads/master@{#14461}

Powered by Google App Engine
This is Rietveld 408576698