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

Unified Diff: net/base/cert_database_nss.cc

Issue 6667020: This change loads opencryptoki and uses the TPM for keygen tags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleaning up Created 9 years, 8 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: net/base/cert_database_nss.cc
diff --git a/net/base/cert_database_nss.cc b/net/base/cert_database_nss.cc
index b8a8e308bcec84d4ec111491610cee9a76bcd609..c8e1e56eda738fe8c448942e97665b9c59e9c221 100644
--- a/net/base/cert_database_nss.cc
+++ b/net/base/cert_database_nss.cc
@@ -109,11 +109,21 @@ void CertDatabase::ListCerts(CertificateList* certs) {
CERT_DestroyCertList(cert_list);
}
-CryptoModule* CertDatabase::GetDefaultModule() const {
+CryptoModule* CertDatabase::GetPublicModule() const {
CryptoModule* module =
- CryptoModule::CreateFromHandle(base::GetDefaultNSSKeySlot());
- // The module is already referenced when returned from GetDefaultNSSKeymodule,
- // so we need to deref it once.
+ CryptoModule::CreateFromHandle(base::GetPublicNSSKeySlot());
+ // The module is already referenced when returned from
+ // GetPublicNSSKeySlot, so we need to deref it once.
+ PK11_FreeSlot(module->os_module_handle());
+
+ return module;
+}
+
+CryptoModule* CertDatabase::GetPrivateModule() const {
+ CryptoModule* module =
+ CryptoModule::CreateFromHandle(base::GetPrivateNSSKeySlot());
+ // The module is already referenced when returned from
+ // GetPrivateNSSKeySlot, so we need to deref it once.
PK11_FreeSlot(module->os_module_handle());
return module;

Powered by Google App Engine
This is Rietveld 408576698