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

Issue 2903743002: Porting SecureSocket to use BoringSSL on OSX (Closed)

Created:
3 years, 7 months ago by bkonyi
Modified:
3 years, 6 months ago
Reviewers:
zra, siva, kevmoo
CC:
reviews_dartlang.org, vm-dev_dartlang.org, kustermann
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Ported SecureSocket to use BoringSSL on OSX and iOS. This included registering a callback with BoringSSL using SSL_CTX_set_cert_verify_callback, which overrides the BoringSSL certificate verification process, in order to verify certificates against the system's root certificates and then proceed to let BoringSSL handle the rest of the SSL session. In addition, this change includes refactoring to share BoringSSL code that used on all platforms. BUG= R=zra@google.com Committed: https://github.com/dart-lang/sdk/commit/644862bf966e6c079460258807ab3364b7e3759a

Patch Set 1 #

Patch Set 2 : Porting SecureSocket to use BoringSSL on OSX #

Patch Set 3 : Porting SecureSocket to use BoringSSL on OSX and iOS #

Patch Set 4 : General cleanup #

Total comments: 63

Patch Set 5 : Addressed comments made by zra@ #

Patch Set 6 : Added secure_socket_utils.h #

Patch Set 7 : Fixed issues on non-Macos platforms #

Total comments: 2

Patch Set 8 : Major refactoring to increase code sharing. Not tested on Linux. #

Patch Set 9 : Fixes to non-macos specific code #

Patch Set 10 : Additional cleanup #

Total comments: 20

Patch Set 11 : Addressed comments; created platform specific files for security_context_*.cc #

Patch Set 12 : Addressed missed comment from last patch set #

Total comments: 18

Patch Set 13 : Minor changes based on comments #

Patch Set 14 : Moved CertificateCallback into SSLCertContext #

Total comments: 6

Patch Set 15 : Addressed nits, confirmed change works on Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2499 lines, -5918 lines) Patch
M runtime/bin/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/bin/io_impl_sources.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -7 lines 0 comments Download
M runtime/bin/io_service.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M runtime/bin/main.cc View 1 2 3 4 5 6 7 8 9 3 chunks +0 lines, -4 lines 0 comments Download
M runtime/bin/secure_socket.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -26 lines 0 comments Download
M runtime/bin/secure_socket_boringssl.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -169 lines 0 comments Download
M runtime/bin/secure_socket_boringssl.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1807 lines 0 comments Download
A + runtime/bin/secure_socket_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +12 lines, -62 lines 0 comments Download
A runtime/bin/secure_socket_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +745 lines, -0 lines 0 comments Download
M runtime/bin/secure_socket_ios.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -239 lines 0 comments Download
M runtime/bin/secure_socket_ios.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1507 lines 0 comments Download
M runtime/bin/secure_socket_macos.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -279 lines 0 comments Download
M runtime/bin/secure_socket_macos.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1815 lines 0 comments Download
A runtime/bin/secure_socket_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +180 lines, -0 lines 0 comments Download
A runtime/bin/secure_socket_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +99 lines, -0 lines 0 comments Download
A runtime/bin/security_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +104 lines, -0 lines 0 comments Download
A runtime/bin/security_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +864 lines, -0 lines 0 comments Download
A runtime/bin/security_context_android.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +71 lines, -0 lines 0 comments Download
A runtime/bin/security_context_fuchsia.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +67 lines, -0 lines 0 comments Download
A runtime/bin/security_context_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +84 lines, -0 lines 0 comments Download
A runtime/bin/security_context_macos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +191 lines, -0 lines 0 comments Download
A runtime/bin/security_context_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +67 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (5 generated)
bkonyi
All standalone/io tests pass on Linux and OSX, and HttpClient has no errors when making ...
3 years, 7 months ago (2017-05-25 22:49:20 UTC) #4
zra
first round of comments. still thinking about how to handle macos/ios. going to look at ...
3 years, 7 months ago (2017-05-26 18:11:14 UTC) #5
kevmoo
Will we be able to use ALPN on mac w/ this? Per https://github.com/dart-lang/pub-dartlang-dart/issues/80 CC Martin
3 years, 7 months ago (2017-05-26 19:17:01 UTC) #7
zra
On 2017/05/26 19:17:01, kevmoo wrote: > Will we be able to use ALPN on mac ...
3 years, 7 months ago (2017-05-26 19:28:31 UTC) #8
kevmoo
On 2017/05/26 19:28:31, zra wrote: > On 2017/05/26 19:17:01, kevmoo wrote: > > Will we ...
3 years, 7 months ago (2017-05-26 19:33:05 UTC) #9
kevmoo
Please update changelog accordingly? Guessing this will be 1.25...
3 years, 7 months ago (2017-05-26 19:33:26 UTC) #10
zra
On 2017/05/26 19:33:26, kevmoo wrote: > Please update changelog accordingly? Guessing this will be 1.25... ...
3 years, 7 months ago (2017-05-26 19:36:11 UTC) #11
bkonyi
I've addressed the comments by zra@ and fixed some issues. PTAL when you have a ...
3 years, 7 months ago (2017-05-26 23:35:31 UTC) #12
zra
I think we should consider splitting the filter code and entry points, and the security ...
3 years, 6 months ago (2017-05-30 16:15:37 UTC) #13
zra
Oh, also, this CL should enable setting the trusted certs on the command line with: ...
3 years, 6 months ago (2017-05-30 16:18:33 UTC) #14
bkonyi
I've managed to remove most of the platform specific code, so hopefully that makes things ...
3 years, 6 months ago (2017-06-02 21:22:53 UTC) #15
kevmoo
Is "SecurityContext.alpnSupported" true for all platforms now? This change should be documented in the CHANGELOG. ...
3 years, 6 months ago (2017-06-02 22:17:19 UTC) #16
zra
On 2017/06/02 22:17:19, kevmoo wrote: > Is "SecurityContext.alpnSupported" true for all platforms now? > > ...
3 years, 6 months ago (2017-06-02 22:54:30 UTC) #17
zra
This is looking much better =) https://codereview.chromium.org/2903743002/diff/180001/runtime/bin/io_impl_sources.gypi File runtime/bin/io_impl_sources.gypi (right): https://codereview.chromium.org/2903743002/diff/180001/runtime/bin/io_impl_sources.gypi#newcode61 runtime/bin/io_impl_sources.gypi:61: 'security_context.cc', Do you ...
3 years, 6 months ago (2017-06-02 22:56:24 UTC) #18
bkonyi
Addressed most of Zach's comments. PTAL when you have a chance. https://codereview.chromium.org/2903743002/diff/180001/runtime/bin/io_impl_sources.gypi File runtime/bin/io_impl_sources.gypi (right): ...
3 years, 6 months ago (2017-06-05 20:25:52 UTC) #19
zra
https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h File runtime/bin/secure_socket_filter.h (right): https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h#newcode24 runtime/bin/secure_socket_filter.h:24: int CertificateCallback(int preverify_ok, X509_STORE_CTX* store_ctx); Maybe move this to ...
3 years, 6 months ago (2017-06-05 21:06:31 UTC) #20
bkonyi
PTAL when you have a chance. https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h File runtime/bin/secure_socket_filter.h (right): https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h#newcode24 runtime/bin/secure_socket_filter.h:24: int CertificateCallback(int preverify_ok, ...
3 years, 6 months ago (2017-06-06 00:48:35 UTC) #21
zra
https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h File runtime/bin/secure_socket_filter.h (right): https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h#newcode24 runtime/bin/secure_socket_filter.h:24: int CertificateCallback(int preverify_ok, X509_STORE_CTX* store_ctx); On 2017/06/06 00:48:34, bkonyi ...
3 years, 6 months ago (2017-06-06 03:09:39 UTC) #22
bkonyi
https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h File runtime/bin/secure_socket_filter.h (right): https://codereview.chromium.org/2903743002/diff/220001/runtime/bin/secure_socket_filter.h#newcode24 runtime/bin/secure_socket_filter.h:24: int CertificateCallback(int preverify_ok, X509_STORE_CTX* store_ctx); On 2017/06/06 03:09:39, zra ...
3 years, 6 months ago (2017-06-06 18:04:43 UTC) #23
zra
lgtm w/ nits https://codereview.chromium.org/2903743002/diff/260001/runtime/bin/secure_socket_utils.h File runtime/bin/secure_socket_utils.h (right): https://codereview.chromium.org/2903743002/diff/260001/runtime/bin/secure_socket_utils.h#newcode51 runtime/bin/secure_socket_utils.h:51: DISALLOW_ALLOCATION(); These are inherited from AllStatic ...
3 years, 6 months ago (2017-06-06 19:16:27 UTC) #24
bkonyi
Addressed nits and confirmed working on Windows. https://codereview.chromium.org/2903743002/diff/260001/runtime/bin/secure_socket_utils.h File runtime/bin/secure_socket_utils.h (right): https://codereview.chromium.org/2903743002/diff/260001/runtime/bin/secure_socket_utils.h#newcode51 runtime/bin/secure_socket_utils.h:51: DISALLOW_ALLOCATION(); On ...
3 years, 6 months ago (2017-06-06 19:51:39 UTC) #25
bkonyi
3 years, 6 months ago (2017-06-06 19:53:06 UTC) #27
Message was sent while issue was closed.
Committed patchset #15 (id:280001) manually as
644862bf966e6c079460258807ab3364b7e3759a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698