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

Unified Diff: crypto/nss_util.h

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cert manager basics working Created 7 years, 2 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
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | crypto/nss_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/nss_util.h
diff --git a/crypto/nss_util.h b/crypto/nss_util.h
index 1d7503d81315649039de8f3a2eabac3a2b7e5c0c..df29b1439b1177c1833ca59c41e047e39a41b134 100644
--- a/crypto/nss_util.h
+++ b/crypto/nss_util.h
@@ -7,6 +7,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback_forward.h"
#include "crypto/crypto_export.h"
namespace base {
@@ -20,6 +21,9 @@ class Time;
// initialization functions.
namespace crypto {
+// XXX remove
+CRYPTO_EXPORT void DumpNSSSlotInfos();
+
// The TPMToken name used for the NSS slot opened by ScopedTestNSSDB.
CRYPTO_EXPORT extern const char kTestTPMTokenName[];
@@ -102,6 +106,9 @@ CRYPTO_EXPORT void OpenPersistentNSSDB();
// GetPrivateNSSKeySlot() will return the TPM slot if one was found.
CRYPTO_EXPORT void EnableTPMTokenForNSS();
+// Returns true if EnableTPMTokenForNSS has been called.
+CRYPTO_EXPORT bool IsTPMTokenEnabledForNSS();
+
// Get name and user PIN for the built-in TPM token on ChromeOS.
// Either one can safely be NULL. Should only be called after
// EnableTPMTokenForNSS has been called with a non-null delegate.
@@ -114,9 +121,14 @@ CRYPTO_EXPORT void GetTPMTokenInfo(std::string* token_name,
// loaded into NSS.
CRYPTO_EXPORT bool IsTPMTokenReady();
+// Register a callback to be run when the TPM module is loaded.
+// If the module is already loaded, the |callback| will be run synchronously.
+CRYPTO_EXPORT void OnTPMReady(const base::Closure& callback);
+
// Initialize the TPM token. Does nothing if it is already initialized.
CRYPTO_EXPORT bool InitializeTPMToken(const std::string& token_name,
- const std::string& user_pin);
+ const std::string& user_pin,
+ int token_slot_id);
#endif
// Convert a NSS PRTime value into a base::Time object.
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | crypto/nss_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698