| Index: crypto/nss_util.cc
|
| diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
|
| index da216b5eeb6742ca5d12b613980902fcdf9e90e4..7f0abc2afa6840680da988b478c0bf6338d81296 100644
|
| --- a/crypto/nss_util.cc
|
| +++ b/crypto/nss_util.cc
|
| @@ -578,6 +578,12 @@ class NSSInitSingleton {
|
| // Unsetting, i.e. setting a NULL, however is allowed.
|
| DCHECK(!slot || !test_system_slot_);
|
| test_system_slot_ = slot.Pass();
|
| + if (test_system_slot_) {
|
| + EnableTPMTokenForNSS();
|
| + tpm_slot_.reset(PK11_ReferenceSlot(test_system_slot_.get()));
|
| + } else {
|
| + tpm_slot_.reset();
|
| + }
|
| }
|
| #endif // defined(OS_CHROMEOS)
|
|
|
| @@ -1013,7 +1019,7 @@ ScopedPK11Slot GetSystemNSSKeySlot(
|
| }
|
|
|
| void SetSystemKeySlotForTesting(ScopedPK11Slot slot) {
|
| - g_nss_singleton.Get().SetSystemKeySlotForTesting(ScopedPK11Slot());
|
| + g_nss_singleton.Get().SetSystemKeySlotForTesting(slot.Pass());
|
| }
|
|
|
| void EnableTPMTokenForNSS() {
|
|
|