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

Issue 15315003: Generate unique certificate nicknames on Linux/CrOS. (Closed)

Created:
7 years, 7 months ago by Ryan Sleevi
Modified:
7 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

Generate unique certificate nicknames on Linux/CrOS. When importing certificates on Linux/CrOS where the user has a pre-existing cert, generate a unique certificate nickname if the DER-encoded subjects do not match, as required by NSS. This updates the template from being: <subject common name>'s <issuer common name> ID to: <subject display name>'s <issuer display name> ID [#d] Where #d will be appended with an incrementing number until a unique nickname is found. Note that "display name" represents a gradiation that starts with common name, then organization name, than organizational unit name. Note: This does not address PKCS#12 importing - only importing CA certificates (root and intermediate) and server certificates via the UI, or the handling of application/x-x509-user-cert (via download). BUG=237870 TEST=net_unittests added. Additionally, test that server & CA certificates can still be imported fine through the UI. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201748

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Update README #

Total comments: 17

Patch Set 4 : Review feedback #

Patch Set 5 : _NE -> _STRNE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+434 lines, -35 lines) Patch
M net/cert/cert_database_nss.cc View 2 chunks +16 lines, -8 lines 0 comments Download
M net/cert/nss_cert_database_unittest.cc View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
M net/cert/x509_certificate_nss.cc View 1 2 3 3 chunks +8 lines, -22 lines 0 comments Download
M net/cert/x509_util_nss.h View 1 2 3 2 chunks +12 lines, -1 line 0 comments Download
M net/cert/x509_util_nss.cc View 1 2 3 3 chunks +31 lines, -1 line 0 comments Download
M net/data/ssl/certificates/README View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
A net/data/ssl/certificates/duplicate_cn_1.p12 View 0 chunks +-1 lines, --1 lines 0 comments Download
A net/data/ssl/certificates/duplicate_cn_1.pem View 1 chunk +78 lines, -0 lines 0 comments Download
A net/data/ssl/certificates/duplicate_cn_2.p12 View 0 chunks +-1 lines, --1 lines 0 comments Download
A net/data/ssl/certificates/duplicate_cn_2.pem View 1 chunk +78 lines, -0 lines 0 comments Download
M net/data/ssl/scripts/ee.cnf View 2 chunks +13 lines, -2 lines 0 comments Download
A net/data/ssl/scripts/generate-duplicate-cn-certs.sh View 1 chunk +132 lines, -0 lines 0 comments Download
M net/third_party/mozilla_security_manager/nsNSSCertificateDB.cpp View 4 chunks +13 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Ryan Sleevi
wtc: This covers all but the PKCS#12 import, for which NSS's API is horrible. Mostly, ...
7 years, 7 months ago (2013-05-22 01:46:54 UTC) #1
wtc
Patch set 3 LGTM. https://codereview.chromium.org/15315003/diff/6001/net/cert/cert_database_nss.cc File net/cert/cert_database_nss.cc (right): https://codereview.chromium.org/15315003/diff/6001/net/cert/cert_database_nss.cc#newcode104 net/cert/cert_database_nss.cc:104: LOG(ERROR) << "Couldn't import user ...
7 years, 7 months ago (2013-05-22 20:58:45 UTC) #2
Ryan Sleevi
https://codereview.chromium.org/15315003/diff/6001/net/cert/cert_database_nss.cc File net/cert/cert_database_nss.cc (right): https://codereview.chromium.org/15315003/diff/6001/net/cert/cert_database_nss.cc#newcode104 net/cert/cert_database_nss.cc:104: LOG(ERROR) << "Couldn't import user certificate. " << PORT_GetError(); ...
7 years, 7 months ago (2013-05-22 23:20:19 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/15315003/8002
7 years, 7 months ago (2013-05-22 23:29:54 UTC) #4
commit-bot: I haz the power
7 years, 7 months ago (2013-05-23 11:07:18 UTC) #5
Message was sent while issue was closed.
Change committed as 201748

Powered by Google App Engine
This is Rietveld 408576698