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

Issue 21716004: dart:io | Add SecureSocket.importPrivateCertificates, that reads a PKCS#12 file. (Closed)

Created:
7 years, 4 months ago by Bill Hesse
Modified:
7 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/dart/source/detail?r=26002

Patch Set 1 #

Patch Set 2 : Add more API functions, tests #

Total comments: 2

Patch Set 3 : Cleanup the CL #

Total comments: 39

Patch Set 4 : Working, clean version. #

Patch Set 5 : Add tests #

Patch Set 6 : Add documentation about the in-memory certificate cache and the certificate database. #

Total comments: 15

Patch Set 7 : Address comments, add some locking. #

Patch Set 8 : Rebase only. #

Patch Set 9 : Add delayed deletion of locked temp directory on Windows. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+604 lines, -51 lines) Patch
M runtime/bin/io_natives.cc View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M runtime/bin/net/nss.gyp View 1 2 3 4 5 6 4 chunks +16 lines, -0 lines 0 comments Download
M runtime/bin/secure_socket.h View 1 2 3 4 5 6 3 chunks +6 lines, -3 lines 0 comments Download
M runtime/bin/secure_socket.cc View 1 2 3 4 5 6 16 chunks +261 lines, -34 lines 0 comments Download
M runtime/bin/secure_socket_patch.dart View 1 2 3 1 chunk +16 lines, -1 line 0 comments Download
M sdk/lib/_internal/lib/io_patch.dart View 1 2 3 2 chunks +20 lines, -1 line 0 comments Download
M sdk/lib/io/secure_socket.dart View 1 2 3 4 5 6 3 chunks +81 lines, -6 lines 0 comments Download
M tests/standalone/io/certificate_test.dart View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M tests/standalone/io/certificate_test_client.dart View 1 2 3 4 5 6 2 chunks +28 lines, -4 lines 0 comments Download
A tests/standalone/io/certificate_test_client_database.dart View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A tests/standalone/io/delete_a_directory_later.dart View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
A tests/standalone/io/pkcert/localhost.p12 View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/standalone/io/user_certificate_test.dart View 1 2 3 4 5 6 7 8 1 chunk +116 lines, -0 lines 1 comment Download

Messages

Total messages: 14 (0 generated)
Bill Hesse
Here is the CL adding import of private keys from a PKCS#12 file to dart:io. ...
7 years, 4 months ago (2013-08-06 16:47:59 UTC) #1
wtc
Review comments on patch set 3: I only reviewed the three runtime/bin/secure_socket* files. Overall the ...
7 years, 4 months ago (2013-08-06 17:52:47 UTC) #2
Søren Gjesse
https://codereview.chromium.org/21716004/diff/6001/runtime/bin/secure_socket.cc File runtime/bin/secure_socket.cc (right): https://codereview.chromium.org/21716004/diff/6001/runtime/bin/secure_socket.cc#newcode110 runtime/bin/secure_socket.cc:110: Maybe move this function closer to where it is ...
7 years, 4 months ago (2013-08-07 07:32:28 UTC) #3
Bill Hesse
OK, PTAL. I still would like feedback on whether to add the <10 pkcs12 NSS ...
7 years, 4 months ago (2013-08-08 17:39:20 UTC) #4
Bill Hesse
7 years, 4 months ago (2013-08-08 17:39:46 UTC) #5
Søren Gjesse
You can place the PKCS12 files in the third_party in the root of the SVN ...
7 years, 4 months ago (2013-08-08 19:03:42 UTC) #6
Søren Gjesse
LGTM
7 years, 4 months ago (2013-08-08 19:03:59 UTC) #7
Ivan Posva
It really makes me uncomfortable to be able to add/register certificates for the whole process. ...
7 years, 4 months ago (2013-08-08 19:38:17 UTC) #8
wtc
Patch set 6 LGTM. I only reviewed the three runtime/bin/secure_socket* files. https://codereview.chromium.org/21716004/diff/22001/runtime/bin/secure_socket.cc File runtime/bin/secure_socket.cc (right): ...
7 years, 4 months ago (2013-08-08 20:01:13 UTC) #9
Bill Hesse
Added some locking around calls that mutate the database. NSS does a very good job ...
7 years, 4 months ago (2013-08-09 13:24:05 UTC) #10
Bill Hesse
Added "delete_a_directory_later.dart" and detatched call to it in "user_certificate_test.dart".
7 years, 4 months ago (2013-08-12 12:06:59 UTC) #11
Søren Gjesse
lgtm https://codereview.chromium.org/21716004/diff/51001/tests/standalone/io/user_certificate_test.dart File tests/standalone/io/user_certificate_test.dart (right): https://codereview.chromium.org/21716004/diff/51001/tests/standalone/io/user_certificate_test.dart#newcode33 tests/standalone/io/user_certificate_test.dart:33: // The certificate database files are locked until ...
7 years, 4 months ago (2013-08-12 12:37:56 UTC) #12
Bill Hesse
Committed patchset #9 manually as r26002 (presubmit successful).
7 years, 4 months ago (2013-08-12 13:51:04 UTC) #13
Bill Hesse
7 years, 4 months ago (2013-08-19 10:30:13 UTC) #14
Message was sent while issue was closed.
On 2013/08/12 13:51:04, Bill Hesse wrote:
> Committed patchset #9 manually as r26002 (presubmit successful).

This patchset was reverted in r26194 (https://codereview.chromium.org/22887014/)

Because it affects all isolates, and its functionality can be accomplished
through shell commands,
it was reverted.  If we commit it again, we should put checks on the C++ uses of
certificate length to check against overflow:

  "It would probably make sense to add some sanity checking against the
"password" string object's length in the
SecureSocket_ImportCertificatesWithPrivateKeys function. There are multiple
arithmetic operations being performed there (+1, *sizeof(uint16_t), etc) with
different variable types ("int" in SECItem, "intptr_t" in your code) and I
imagine it would be potentially possible to create a 2GB+ string in 64-bit
Chrome process."

Powered by Google App Engine
This is Rietveld 408576698