diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-25 21:45:04 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-25 21:45:04 +0000 |
commit | bee9b546274a20a8e51c7924e4af0b833b51a846 (patch) | |
tree | 0cd4a78b4add69bc79760aabf1e79bfd2b8f9ca8 /crypto | |
parent | e703dfe0959014e0f5e2b3831723208614528164 (diff) | |
download | chromium_src-bee9b546274a20a8e51c7924e4af0b833b51a846.zip chromium_src-bee9b546274a20a8e51c7924e4af0b833b51a846.tar.gz chromium_src-bee9b546274a20a8e51c7924e4af0b833b51a846.tar.bz2 |
Remove crypto::GetTPMTokenInfo which is no longer necessary.
BUG=none
Review URL: https://codereview.chromium.org/83833003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/nss_util.cc | 32 | ||||
-rw-r--r-- | crypto/nss_util.h | 10 |
2 files changed, 4 insertions, 38 deletions
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 3b454d0..5f20595 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -234,9 +234,7 @@ class NSSInitSingleton { tpm_token_enabled_for_nss_ = true; } - bool InitializeTPMToken(const std::string& token_name, - int token_slot_id, - const std::string& user_pin) { + bool InitializeTPMToken(int token_slot_id) { DCHECK(thread_checker_.CalledOnValidThread()); // If EnableTPMTokenForNSS hasn't been called, return false. @@ -247,9 +245,6 @@ class NSSInitSingleton { if (chaps_module_ && tpm_slot_) return true; - tpm_token_name_ = token_name; - tpm_user_pin_ = user_pin; - // This tries to load the Chaps module so NSS can talk to the hardware // TPM. if (!chaps_module_) { @@ -277,18 +272,6 @@ class NSSInitSingleton { return false; } - void GetTPMTokenInfo(std::string* token_name, std::string* user_pin) { - DCHECK(thread_checker_.CalledOnValidThread()); - if (!tpm_token_enabled_for_nss_) { - LOG(ERROR) << "GetTPMTokenInfo called before TPM Token is ready."; - return; - } - if (token_name) - *token_name = tpm_token_name_; - if (user_pin) - *user_pin = tpm_user_pin_; - } - bool IsTPMTokenReady() { // TODO(mattm): Change to DCHECK when callers have been fixed. if (!thread_checker_.CalledOnValidThread()) { @@ -629,8 +612,6 @@ class NSSInitSingleton { static bool force_nodb_init_; bool tpm_token_enabled_for_nss_; - std::string tpm_token_name_; - std::string tpm_user_pin_; SECMODModule* chaps_module_; PK11SlotInfo* software_slot_; PK11SlotInfo* test_slot_; @@ -800,19 +781,12 @@ void EnableTPMTokenForNSS() { g_nss_singleton.Get().EnableTPMTokenForNSS(); } -void GetTPMTokenInfo(std::string* token_name, std::string* user_pin) { - g_nss_singleton.Get().GetTPMTokenInfo(token_name, user_pin); -} - bool IsTPMTokenReady() { return g_nss_singleton.Get().IsTPMTokenReady(); } -bool InitializeTPMToken(const std::string& token_name, - int token_slot_id, - const std::string& user_pin) { - return g_nss_singleton.Get().InitializeTPMToken( - token_name, token_slot_id, user_pin); +bool InitializeTPMToken(int token_slot_id) { + return g_nss_singleton.Get().InitializeTPMToken(token_slot_id); } #endif // defined(OS_CHROMEOS) diff --git a/crypto/nss_util.h b/crypto/nss_util.h index 2c825a0..efc8140 100644 --- a/crypto/nss_util.h +++ b/crypto/nss_util.h @@ -102,12 +102,6 @@ CRYPTO_EXPORT void OpenPersistentNSSDB(); // GetPrivateNSSKeySlot() will return the TPM slot if one was found. CRYPTO_EXPORT void EnableTPMTokenForNSS(); -// 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. -CRYPTO_EXPORT void GetTPMTokenInfo(std::string* token_name, - std::string* user_pin); - // 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 @@ -115,9 +109,7 @@ CRYPTO_EXPORT void GetTPMTokenInfo(std::string* token_name, CRYPTO_EXPORT bool IsTPMTokenReady(); // Initialize the TPM token. Does nothing if it is already initialized. -CRYPTO_EXPORT bool InitializeTPMToken(const std::string& token_name, - int token_slot_id, - const std::string& user_pin); +CRYPTO_EXPORT bool InitializeTPMToken(int token_slot_id); #endif // Convert a NSS PRTime value into a base::Time object. |