Chromium Code Reviews| Index: crypto/nss_util.cc |
| diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc |
| index 29a0b6686fe21d30c4152359a54252b3b4408701..0f10bd196d9acae199b7e9183311023ad3a1c1c3 100644 |
| --- a/crypto/nss_util.cc |
| +++ b/crypto/nss_util.cc |
| @@ -579,6 +579,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(); |
|
pneubeck (no reviews)
2014/07/31 06:31:25
This one should actually not be necessary and I'll
|
| + tpm_slot_.reset(PK11_ReferenceSlot(test_system_slot_.get())); |
|
mattm
2014/07/30 22:57:34
need to call tpm_ready_callback_list_ callbacks to
pneubeck (no reviews)
2014/07/31 06:31:25
These callbacks are usually triggered by a Initial
mattm
2014/07/31 10:29:30
Right, my point was when the test uses software sl
pneubeck (no reviews)
2014/07/31 10:48:54
Setting tpm_slot_ toggles IsTPMTokenReady to true
pneubeck (no reviews)
2014/08/01 10:02:28
Thinking about this again, I see now what you mean
|
| + } else { |
| + tpm_slot_.reset(); |
| + } |
| } |
| #endif // defined(OS_CHROMEOS) |
| @@ -1014,7 +1020,7 @@ ScopedPK11Slot GetSystemNSSKeySlot( |
| } |
| void SetSystemKeySlotForTesting(ScopedPK11Slot slot) { |
| - g_nss_singleton.Get().SetSystemKeySlotForTesting(ScopedPK11Slot()); |
| + g_nss_singleton.Get().SetSystemKeySlotForTesting(slot.Pass()); |
| } |
| void EnableTPMTokenForNSS() { |