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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys_nss.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: rebase on https://codereview.chromium.org/2899083006/ Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
index 04a6af4ec6d907899ae5911cd002a38ffb7656ce..2125a0c542999db156ca86a6ff49abe4118653f9 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
+++ b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
@@ -546,11 +546,16 @@ void SignRSAWithDB(std::unique_ptr<SignRSAState> state,
// SelectCertificatesOnIOThread().
void DidSelectCertificatesOnIOThread(
std::unique_ptr<SelectCertificatesState> state,
- net::CertificateList certs) {
+ net::ClientCertIdentityList identities) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- state->CallBack(FROM_HERE,
- base::MakeUnique<net::CertificateList>(std::move(certs)),
- std::string() /* no error */);
+ // XXX convert the ClientCertIdentityList to a CertificateList since
+ // returning ClientCertIdentities would require changing platformKeys
+ // extension api.
+ std::unique_ptr<net::CertificateList> certs =
+ base::MakeUnique<net::CertificateList>();
+ for (const std::unique_ptr<net::ClientCertIdentity>& identity : identities)
+ certs->push_back(identity->certificate());
+ state->CallBack(FROM_HERE, std::move(certs), std::string() /* no error */);
}
// Continues selecting certificates on the IO thread. Used by

Powered by Google App Engine
This is Rietveld 408576698