Commit Graph

30 Commits

Author SHA1 Message Date
Jacob Richman 4360e99d18 Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman 62be0eacfb Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman 88f8aacd5f Re-apply rolled back CL to apply dartfmt to runtime.
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak ea4744a06f Revert "Run dartfmt on all files under runtime."
This reverts commit 15f393f189.

The change caused many service test failures due to changed line numbers.

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman 15f393f189 Run dartfmt on all files under runtime.
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -07:00
Matthias Hausner 1a6d1eca32 Implement @patch annotation for patch class members
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.

Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Matthias Hausner e11ca24053 Use metadata annotation @patch for patch classes
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.

The deprecated syntax is still supported, but a warning is printed when detected.

BUG=

Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
Zach Anderson e900b1b944 Implements secure sockets on Mac OS with SecureTransport API
R=iposva@google.com

Review URL: https://codereview.chromium.org/1721283002 .
2016-03-21 15:46:29 -07:00
Zachary Anderson e2729705ff Rolls back fix of SecurityContext method names.
R=iposva@google.com

Review URL: https://codereview.chromium.org/1757453002 .
2016-03-01 10:34:15 -08:00
Zachary Anderson 38786e9566 More SecurityContext calls accept a password.
Any PKCS12 container, not just those containing a private key, can be
protected by a password. This change adds an optional named `password`
parameter to other SecurityContext calls, and plumbs it through to
the calls reading PKCS12 data.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1699163002 .
2016-02-17 10:58:19 -08:00
Zachary Anderson 2cf6405ca9 Adds SecurityContext.setTrustedCertificatesBytes
Implements SecurityContext.setTrustedCertificates in terms of the new
function. This requires setTrustedCertificates to return a Future,
and removing the `directory` named argument as it is not possible to
implement with BoringSSL without blocking IO.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1665433002 .
2016-02-08 08:41:49 -08:00
Zachary Anderson 8f356bf87e Adds SecurityContext.useCertificateChainBytes
Changes SecurityContext.useCertificateChain to call the new method and
return a Future.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1648793005 .
2016-02-02 10:54:07 -08:00
Zachary Anderson 98771a083f Adds SecurityContext.usePrivateKeyBytes
This is the first step toward removing blocking IO calls from
the implementation of the SecurityContext API.

Using a buffer rather than a file name API will probably be needed
for implementing SecurityContext and SecureSocket with platform
specific built-in APIs on iOS/Mac/Windows rather than BoringSSL.

related #8227

R=whesse@google.com

Review URL: https://codereview.chromium.org/1616073004 .
2016-01-29 08:52:18 -08:00
William Hesse 169b132a63 Add unique serial numbers to sample X509 certificates. Remove the "sendClientCertificate" parameter from SecureSocket.connect.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1420923006 .
2015-10-29 13:17:22 +01:00
William Hesse 13bf8ff9f8 Breaking Change: merge BoringSSL branch into master
This replaces the NSS secure networking library from Mozilla
with the BoringSSL library from Google. This library, based
on OpenSSL, reads certificates from files in PEM format, rather
than storing certificates and keys in a SQLite database, the
way NSS does. There will be a blog post, changelog entries,
and other documentation of the breaking changes.

Review URL: https://codereview.chromium.org//1319703002 .
2015-08-26 14:42:12 +02:00
kustermann@google.com 53cc8c512d Support for the ALPN extension of the TLS protocol for Client and Server
This CL uses the NSS support for the ALPN extension of the TLS protocol
(see RFC 7301).

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//625953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41628 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 12:31:02 +00:00
ajohnsen@google.com a347038cd7 Merge services into a shared IOService in dart:io, and use a native port.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//24395013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27883 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:03:24 +00:00
sgjesse@google.com affa849184 Remove the certificate management methods from dart:io
Certificate management functions where added to dart:io in r25610 and
r26002. However these functions where mutating the NSS database for
the whole Dart process, and some functions where also persisting the
changes to the database.

This might cause issues when running multiple isolates as changes in
one isolate will affect other isolates and could lead to unexpected
results.

These functions are removed from dart:io for now.

BUG=http://dartbug.com/8227
TBR=ager@google.com

Review URL: https://codereview.chromium.org//22887014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26194 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 14:55:53 +00:00
regis@google.com 9eb12ad303 Implement updated method overriding rules in the vm (issue 11495).
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.

R=asiva@google.com

Review URL: https://codereview.chromium.org//22685007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
whesse@google.com 292f34bdb3 dart:io | Add SecureSocket.importPrivateCertificates, that reads a PKCS#12 file.
Add private key with certificate to SecureSocket

BUG=
R=sgjesse@google.com, wtc@chromium.org

Review URL: https://codereview.chromium.org//21716004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26002 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 13:50:53 +00:00
whesse@google.com 9e27f1b98b Add SecureSocket.addCertificate.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//18097007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25610 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 10:01:07 +00:00
whesse@google.com c256ddfe10 dart:io | Support connection renegotiation (rehandshake) on SecureSocket.
BUG=dartbug.com/11384
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//18984008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24916 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 14:02:49 +00:00
whesse@google.com 91deb19914 dart:io | Enable multithreaded secure networking encryption.
BUG=
R=ajohnsen@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//16858011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24233 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 15:06:43 +00:00
sgjesse@google.com 54f6939ffc Ensure that there is no "hidden" DNS lookup in secure socket code
The required setting of the internet adddress of the peer for NSS is
now using the internet address which have already been looked up in
Dart code for normal secure socket connect.

In the cases where SecureSocket.secure and RawSecureSocket.secure is
used with a host name, the internet address of the already connected
socket will be used. If that is not sufficient an IntetnetAddress from
DNS lookup in Dart can be passed instead of just a host name.

R=ajohnsen@google.com, whesse@google.com
BUG=http://dartbug.com/11103

Review URL: https://codereview.chromium.org//17381012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24174 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 09:07:43 +00:00
asiva@google.com 1792aa6bf3 Change SecureSocket to use a single patch class instead of multiple patch classes the way it is being done now.
R=ager@google.com

Review URL: https://codereview.chromium.org//15899003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23087 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 17:54:32 +00:00
sgjesse@google.com 488b016a2f Merge IO v2 branch to bleeding edge
R=ager@google.com, ajohnsen@google.com, whesse@google.com

BUG=

Review URL: https://codereview.chromium.org//12316036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18820 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:58:11 +00:00
whesse@google.com f542f14380 Enable client certificates in SecureSocket and SecureServerSocket
BUG=

Review URL: https://codereview.chromium.org//11467004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15957 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 09:26:23 +00:00
whesse@google.com 4eeedf0cab Add a callback to SecureSocket for certificates that fail to be authenticated.
BUG=

Review URL: https://codereview.chromium.org//11415290

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15734 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 14:31:51 +00:00
whesse@google.com 7bc0bbd284 Add built-in root certificates to dart:io SecureSocket.
Add flag that allows them to disabled at runtime.

BUG=

Review URL: https://codereview.chromium.org//11308271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15634 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 13:15:51 +00:00
whesse@google.com 15d5c6b582 Rename TlsSocket to SecureSocket, and all other Tls... items to Secure....
BUG=

Review URL: https://codereview.chromium.org//11419138

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15274 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-23 09:21:48 +00:00