diff options
author | mattm@google.com <mattm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 22:24:07 +0000 |
---|---|---|
committer | mattm@google.com <mattm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 22:24:07 +0000 |
commit | 557737f70d0c097b2f1a78b4acb552dad725ab61 (patch) | |
tree | 03a8a5c14f6503eda33e4d28269e3857281ecf59 /crypto/nss_util.h | |
parent | 637fc4cd2748b8679a9b4a4a4c518c02b1afa699 (diff) | |
download | chromium_src-557737f70d0c097b2f1a78b4acb552dad725ab61.zip chromium_src-557737f70d0c097b2f1a78b4acb552dad725ab61.tar.gz chromium_src-557737f70d0c097b2f1a78b4acb552dad725ab61.tar.bz2 |
Initialize per-ChromeOS-user NSS slots and provide the functions to access them.
BUG=302124
R=mmenke@chromium.org, rsleevi@chromium.org, xiyuan@chromium.org
Review URL: https://codereview.chromium.org/53763003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/nss_util.h')
-rw-r--r-- | crypto/nss_util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crypto/nss_util.h b/crypto/nss_util.h index efc8140..4d3d3e2 100644 --- a/crypto/nss_util.h +++ b/crypto/nss_util.h @@ -7,6 +7,8 @@ #include <string> #include "base/basictypes.h" +#include "base/callback_forward.h" +#include "base/compiler_specific.h" #include "crypto/crypto_export.h" namespace base { @@ -102,11 +104,18 @@ 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(); + // Returns true if the TPM is owned and PKCS#11 initialized with the // user and security officer PINs, and has been enabled in NSS by // calling EnableTPMForNSS, and Chaps has been successfully // loaded into NSS. -CRYPTO_EXPORT bool IsTPMTokenReady(); +// If |callback| is non-null and the function returns false, the |callback| will +// be run once the TPM is ready. |callback| will never be run if the function +// returns true. +CRYPTO_EXPORT bool IsTPMTokenReady(const base::Closure& callback) + WARN_UNUSED_RESULT; // Initialize the TPM token. Does nothing if it is already initialized. CRYPTO_EXPORT bool InitializeTPMToken(int token_slot_id); |