Ryan Macnak
53733077b2
Revert "[standalone] Remove the fallback root certificates."
...
This reverts commit 039aef728a .
Reason for revert: b/515601247
Original change's description:
> [standalone] Remove the fallback root certificates.
>
> The discovery of the system root certificates is more robust after 2142d8e148 .
>
> TEST=ci
> Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
> Reviewed-by: Slava Egorov <vegorov@google.com >
> Commit-Queue: Ryan Macnak <rmacnak@google.com >
TEST=ci
Change-Id: Ib07de221ff1160461d930f7165a7cd8179b4e3f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506100
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2026-05-26 07:49:52 -07:00
Ryan Macnak
039aef728a
[standalone] Remove the fallback root certificates.
...
The discovery of the system root certificates is more robust after 2142d8e148 .
TEST=ci
Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
Reviewed-by: Slava Egorov <vegorov@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2026-05-19 11:20:48 -07:00
Ryan Macnak
42d796f7c1
[dart:io, mac] Don't create a thread pool per secure socket.
...
TEST=ci
Bug: https://github.com/flutter/flutter/issues/170723
Change-Id: I381c0dac8f7e308830c8bba472e11fb20939708e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436501
Reviewed-by: Brian Quinlan <bquinlan@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2025-06-24 12:17:24 -07:00
Ryan Macnak
3c298dbca5
[vm] Update to constexpr in runtime/bin.
...
TEST=build
Change-Id: I18fc7cfe725dc978d4b23de6191e455ac7cd75e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293800
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2023-04-12 20:32:29 +00:00
Ryan Macnak
b68351fbc3
[vm] Update NULL to nullptr in runtime/bin.
...
TEST=build
Change-Id: Ie3be570c274b0275a995a0f54b5e6ccdfc77ccd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292287
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Brian Quinlan <bquinlan@google.com >
2023-04-12 01:11:05 +00:00
Brian Quinlan
c286b76c2d
Allow sockets to enable TLS renegotiation.
...
TESTED=unit + manually tested user issue.
Bug: https://github.com/dart-lang/sdk/issues/47841
Change-Id: Iad13899135fd34f15abba3a499132d88e7f597dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234821
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Brian Quinlan <bquinlan@google.com >
2022-03-31 06:40:51 +00:00
Brian Quinlan
917ae52f70
Add the ability to log TLS keys.
...
TEST=unit tests
Bug: https://github.com/dart-lang/sdk/issues/47838
Change-Id: I8a64e8623022215cae261eadb25b22deb9f3d910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231330
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Brian Quinlan <bquinlan@google.com >
2022-02-17 21:39:31 +00:00
Alexander Aprelev
bc2cf88bac
[io/ssl] Add an option to bypass trusting system cert roots.
...
Fixes https://github.com/dart-lang/sdk/issues/45912
TEST=manually remove root certificate for pub.dev, confirm that dart is not able to establish https connection in default configuration to pub.dev, confirm that it can connect with the flag.
Change-Id: I51af7994d7cd7371a17877844dc1bf39cd5e54ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198442
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2021-05-06 02:46:02 +00:00
Alexander Aprelev
340f78eab3
[vm/io] Add a test for nonblocking ssl certification evaluation.
...
This is follow-up to a6dafabb88 .
Fixes https://github.com/dart-lang/sdk/issues/43674
Change-Id: I4da732ab08235a1f549d45c7fa5fb87db672e2aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166701
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-10-12 15:06:52 +00:00
Alexander Aprelev
a6dafabb88
[vm/io/mac] On macos/ios run trust evaluation part of ssl certification validation on separate worker thread.
...
Running trust evaluation system api call on worker thread effectively unblocks main isolate when it attempts to establish https connection.
Execution of the worker thread is implemented via dart native port infrastructure which allows to run C++ code as a dart message handler.
TrustEvaluateHandlerFunc (if provided by platform-dependent SSLCertContext) is that handler, only mac(ios) implementation provides it.
Asynchrony of CertificateVerificationCallback (for mac/ios) is implemented via [ssl_verify_retry] return code which allows to suspend ssl handshake until certificate trust is confirmed.
When dart's _RawSecureSocket.secureHandshake() method that initiated ssl's handshake received this return code it knows it has to wait for a future that is completed by another callback([rpEvaluteResponse]) that waits for trust evaluation handler response.
rpEvaluateResponse purpose is to listen for response from TrustEvaluateHandler and also invoke user-provided [badCertficateCallback] that can override trust decision for a given connection request, for a given certificate.
Once that future is completed and CertificateVerificationCallback knows whether to trust a certificate or not, _secureHandshake retries ssl handshake.
Bug: https://github.com/dart-lang/sdk/issues/41519
Change-Id: Ifee18639c78099ec77cad50000444bc6c7b9369b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165520
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Alexander Aprelev <aam@google.com >
2020-10-01 23:40:16 +00:00
Zach Anderson
e7495e427c
[dart:io] Adds X509Certificate.der and X509Certificate.pem
...
fixes #33115
Change-Id: I7ccf5998b23e936040fe65792824f09d3f494cf7
Reviewed-on: https://dart-review.googlesource.com/55505
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Ben Konyi <bkonyi@google.com >
2018-05-17 16:20:06 +00:00
Zachary Anderson
d7845c6a6f
[standalone] Clean up command line argument parsing
...
fixes #30534
Change-Id: I5e721e5d24de32f0cb85f7bd96890913cf788f81
Reviewed-on: https://dart-review.googlesource.com/4608
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2017-09-11 18:58:39 +00:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Ben Konyi
644862bf96
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
Review-Url: https://codereview.chromium.org/2903743002 .
2017-06-06 12:52:57 -07:00