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

Issue 394013005: Remove NSSCertDatabase from ClientCertStoreChromeOS unittest. (Closed)

Created:
6 years, 5 months ago by pneubeck (no reviews)
Modified:
6 years, 5 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Remove NSSCertDatabase from ClientCertStoreChromeOS unittest. The database was only used to import a PKCS#12 file. By changing to separate key (PKCS#8 format) and cert (X509 in PEM encoding), only dependencies on the lower level RSAPrivateKey, X509Certificate and PK11_* NSS functions are required. Note this removes at the same time a call to the deprecated NSSCertDatabase::GetInstance(). Also - fixes multi profile cases of the unit test and the CA matching (the latter is now identical to all other platforms). - fixes a bug in the matching of client certs from software slots, because of reused cert database names - gets rid of the error output that occurred during the PKCS12 import because the file contained also a CA cert: [ERROR:nsPKCS12Blob.cpp(219)] Could not grab a handle to the certificate in the slot from the corresponding PKCS#12 DER certificate. BUG=210525, 329735, 315285 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284056

Patch Set 1 : #

Total comments: 20

Patch Set 2 : Addressed comments. Cleaned up the unit test further. #

Patch Set 3 : Broke binary files into separate CL. Rebased. #

Total comments: 5

Patch Set 4 : Fixed gyp file. #

Total comments: 17

Patch Set 5 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -129 lines) Patch
M crypto/nss_util.cc View 1 5 chunks +10 lines, -6 lines 0 comments Download
M net/BUILD.gn View 1 2 chunks +7 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M net/ssl/client_cert_store_chromeos.h View 1 1 chunk +0 lines, -15 lines 0 comments Download
M net/ssl/client_cert_store_chromeos.cc View 1 1 chunk +0 lines, -24 lines 0 comments Download
M net/ssl/client_cert_store_chromeos_unittest.cc View 1 2 3 4 2 chunks +175 lines, -82 lines 0 comments Download
M net/test/cert_test_util.h View 1 2 3 4 1 chunk +23 lines, -2 lines 0 comments Download
A net/test/cert_test_util_nss.cc View 1 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
pneubeck (no reviews)
ptal https://codereview.chromium.org/394013005/diff/40001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/394013005/diff/40001/crypto/nss_util.cc#newcode60 crypto/nss_util.cc:60: const char kNSSDatabaseName[] = "Real NSS db"; I ...
6 years, 5 months ago (2014-07-16 10:08:25 UTC) #1
Ryan Sleevi
Pretty sure you also need to update the .GN files. https://codereview.chromium.org/394013005/diff/40001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/394013005/diff/40001/crypto/nss_util.cc#newcode60 ...
6 years, 5 months ago (2014-07-16 19:32:18 UTC) #2
pneubeck (no reviews)
https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode46 net/ssl/client_cert_store_chromeos_unittest.cc:46: << cert_filename; On 2014/07/16 19:32:18, Ryan Sleevi wrote: > ...
6 years, 5 months ago (2014-07-16 19:49:45 UTC) #3
Ryan Sleevi
https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode46 net/ssl/client_cert_store_chromeos_unittest.cc:46: << cert_filename; On 2014/07/16 19:49:44, pneubeck wrote: > On ...
6 years, 5 months ago (2014-07-16 19:59:00 UTC) #4
pneubeck (no reviews)
https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode101 net/ssl/client_cert_store_chromeos_unittest.cc:101: ASSERT_EQ(1u, request_1->client_certs.size()); On 2014/07/16 19:59:00, Ryan Sleevi wrote: > ...
6 years, 5 months ago (2014-07-16 20:01:39 UTC) #5
Ryan Sleevi
> Line 54 of the old file: > // TODO(mattm): Do better testing of cert_authorities ...
6 years, 5 months ago (2014-07-16 20:03:02 UTC) #6
pneubeck (no reviews)
https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode101 net/ssl/client_cert_store_chromeos_unittest.cc:101: ASSERT_EQ(1u, request_1->client_certs.size()); That's fair. My reasoning was: Matt commented ...
6 years, 5 months ago (2014-07-16 20:15:23 UTC) #7
Ryan Sleevi
https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode101 net/ssl/client_cert_store_chromeos_unittest.cc:101: ASSERT_EQ(1u, request_1->client_certs.size()); I guess this highlights poor documentation. I ...
6 years, 5 months ago (2014-07-16 20:46:07 UTC) #8
pneubeck (no reviews)
https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/40001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode101 net/ssl/client_cert_store_chromeos_unittest.cc:101: ASSERT_EQ(1u, request_1->client_certs.size()); On 2014/07/16 20:46:07, Ryan Sleevi wrote: > ...
6 years, 5 months ago (2014-07-16 21:29:58 UTC) #9
Ryan Sleevi
I think we're in violent agreement, I'm just violently confused. I think the action items ...
6 years, 5 months ago (2014-07-16 21:38:40 UTC) #10
Ryan Sleevi
With that separation of tests mentioned, and to save you a roundtrip, I think it ...
6 years, 5 months ago (2014-07-16 21:41:40 UTC) #11
pneubeck (no reviews)
On 2014/07/16 21:38:40, Ryan Sleevi wrote: > I think we're in violent agreement, I'm just ...
6 years, 5 months ago (2014-07-16 21:53:28 UTC) #12
pneubeck (no reviews)
On 2014/07/16 21:41:40, Ryan Sleevi wrote: > With that separation of tests mentioned, and to ...
6 years, 5 months ago (2014-07-16 21:58:39 UTC) #13
pneubeck (no reviews)
https://codereview.chromium.org/394013005/diff/40001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/394013005/diff/40001/crypto/nss_util.cc#newcode60 crypto/nss_util.cc:60: const char kNSSDatabaseName[] = "Real NSS db"; On 2014/07/16 ...
6 years, 5 months ago (2014-07-17 13:26:43 UTC) #14
pneubeck (no reviews)
since the change is not as trivial as probably anticipated, ptal. The unit test now ...
6 years, 5 months ago (2014-07-17 13:40:50 UTC) #15
pneubeck (no reviews)
please also take a second look at the .gyp and .gn changes. Thanks!
6 years, 5 months ago (2014-07-17 13:45:20 UTC) #16
Ryan Sleevi
Quick feedback since it may have larger implications. Will review more in depth later today. ...
6 years, 5 months ago (2014-07-17 18:42:20 UTC) #17
pneubeck (no reviews)
https://codereview.chromium.org/394013005/diff/100001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/100001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode57 net/ssl/client_cert_store_chromeos_unittest.cc:57: CHECK(user_.constructed_successfully()); On 2014/07/17 18:42:20, Ryan Sleevi wrote: > On ...
6 years, 5 months ago (2014-07-17 21:45:10 UTC) #18
Ryan Sleevi
LGTM, with caveat about init (e.g. fine to defer) https://codereview.chromium.org/394013005/diff/120001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/120001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode26 net/ssl/client_cert_store_chromeos_unittest.cc:26: ...
6 years, 5 months ago (2014-07-17 22:18:52 UTC) #19
pneubeck (no reviews)
Added more documentation. https://codereview.chromium.org/394013005/diff/120001/net/ssl/client_cert_store_chromeos_unittest.cc File net/ssl/client_cert_store_chromeos_unittest.cc (right): https://codereview.chromium.org/394013005/diff/120001/net/ssl/client_cert_store_chromeos_unittest.cc#newcode26 net/ssl/client_cert_store_chromeos_unittest.cc:26: bool ImportClientCertToSlot(scoped_refptr<X509Certificate> cert, On 2014/07/17 22:18:52, ...
6 years, 5 months ago (2014-07-18 08:42:42 UTC) #20
pneubeck (no reviews)
The CQ bit was checked by pneubeck@chromium.org
6 years, 5 months ago (2014-07-18 08:45:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/394013005/220001
6 years, 5 months ago (2014-07-18 08:45:47 UTC) #22
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 10:57:19 UTC) #23
Message was sent while issue was closed.
Change committed as 284056

Powered by Google App Engine
This is Rietveld 408576698