diff options
author | stevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 20:41:55 +0000 |
---|---|---|
committer | stevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 20:41:55 +0000 |
commit | c175cdb75905a3145675c20884888e6348784b62 (patch) | |
tree | 8a47a055e88ba3e8344effd22efe7296c89604d0 /crypto/nss_util.h | |
parent | 5638c8c91bc36494327594df1df3230f962cbf84 (diff) | |
download | chromium_src-c175cdb75905a3145675c20884888e6348784b62.zip chromium_src-c175cdb75905a3145675c20884888e6348784b62.tar.gz chromium_src-c175cdb75905a3145675c20884888e6348784b62.tar.bz2 |
Replace WifiConfigModel with async CertLibrary
Update WifiConfigView and VpnConfigView to use CertLibrary.
Includes changes to crypto:nss_util.cc
BUG=chromium-os:15829
TEST=Test wifi/other + certificates and VPN + certificates. UI should not block.
Review URL: http://codereview.chromium.org/7244012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/nss_util.h')
-rw-r--r-- | crypto/nss_util.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/nss_util.h b/crypto/nss_util.h index 1244db9..19298ca 100644 --- a/crypto/nss_util.h +++ b/crypto/nss_util.h @@ -93,7 +93,17 @@ class TPMTokenInfoDelegate { public: TPMTokenInfoDelegate(); virtual ~TPMTokenInfoDelegate(); + + // Returns true if the hardware supports a TPM Token and the TPM is enabled. + virtual bool IsTokenAvailable() const = 0; + + // Returns true if the TPM and PKCS#11 token slot is ready to be used. + // If IsTokenAvailable() is false this should return false. + // If IsTokenAvailable() is true, this should eventually return true. virtual bool IsTokenReady() const = 0; + + // Fetches token properties. TODO(stevenjb): make this interface asynchronous + // so that the implementation does not have to be blocking. virtual void GetTokenInfo(std::string* token_name, std::string* user_pin) const = 0; }; @@ -110,11 +120,18 @@ void EnableTPMTokenForNSS(TPMTokenInfoDelegate* delegate); // EnableTPMTokenForNSS has been called with a non-null delegate. void GetTPMTokenInfo(std::string* token_name, std::string* user_pin); +// Returns true if the machine has a TPM and it can be used to store tokens. +bool IsTPMTokenAvailable(); + // 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 opencryptoki has been successfully // loaded into NSS. bool IsTPMTokenReady(); + +// Same as IsTPMTokenReady() except this attempts to initialize the token +// if necessary. +bool EnsureTPMTokenReady(); #endif // Convert a NSS PRTime value into a base::Time object. |