diff options
author | pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-12 14:09:19 +0000 |
---|---|---|
committer | pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-12 14:09:19 +0000 |
commit | b17bc3666e113665c90fe6eb9dc0047460f52b37 (patch) | |
tree | 4d3f805540585dc85d633010050b6e6caca3f6fc /crypto | |
parent | 9b2ebc74624af200f63cd92e1717469efd6b2249 (diff) | |
download | chromium_src-b17bc3666e113665c90fe6eb9dc0047460f52b37.zip chromium_src-b17bc3666e113665c90fe6eb9dc0047460f52b37.tar.gz chromium_src-b17bc3666e113665c90fe6eb9dc0047460f52b37.tar.bz2 |
Make CryptohomeClientImplStub and ScopedTestNSSDB use the same TokenName.
This allows for tests which rely on CertLoader::IsHardwareBacked returning true.
BUG=NONE
R=agl@chromium.org, stevenjb@chromium.org
Review URL: https://codereview.chromium.org/22407013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/nss_util.cc | 4 | ||||
-rw-r--r-- | crypto/nss_util.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 069d5b6..27541ca 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -313,7 +313,7 @@ class NSSInitSingleton { return true; if (!g_test_nss_db_dir.Get().CreateUniqueTempDir()) return false; - test_slot_ = OpenUserDB(g_test_nss_db_dir.Get().path(), "Test DB"); + test_slot_ = OpenUserDB(g_test_nss_db_dir.Get().path(), kTestTPMTokenName); return !!test_slot_; } @@ -594,6 +594,8 @@ base::LazyInstance<NSSInitSingleton>::Leaky g_nss_singleton = LAZY_INSTANCE_INITIALIZER; } // namespace +const char kTestTPMTokenName[] = "Test DB"; + #if defined(USE_NSS) void EarlySetupForNSSInit() { base::FilePath database_dir = GetInitialConfigDirectory(); diff --git a/crypto/nss_util.h b/crypto/nss_util.h index 77a9649..1d7503d 100644 --- a/crypto/nss_util.h +++ b/crypto/nss_util.h @@ -20,6 +20,9 @@ class Time; // initialization functions. namespace crypto { +// The TPMToken name used for the NSS slot opened by ScopedTestNSSDB. +CRYPTO_EXPORT extern const char kTestTPMTokenName[]; + #if defined(USE_NSS) // EarlySetupForNSSInit performs lightweight setup which must occur before the // process goes multithreaded. This does not initialise NSS. For test, see |