Bug 592276 - Utils.mpLocked() should allow nsIPKCS11Slot.SLOT_UNINITIALIZED [r=mconnor]
authorPhilipp von Weitershausen <philipp@weitershausen.de>
Tue, 31 Aug 2010 17:58:35 +0200
changeset 52161 1bd7ce626b419dfabbd24224115b2f19aa46cc5a
parent 52160 5f3ccb35f8901169922feaae6cb9c2d8a04c6867
child 52162 af16b2758c1ce2d28f4d54e7d402528cb3468e1f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmconnor
bugs592276
Bug 592276 - Utils.mpLocked() should allow nsIPKCS11Slot.SLOT_UNINITIALIZED [r=mconnor]
services/sync/modules/util.js
--- a/services/sync/modules/util.js
+++ b/services/sync/modules/util.js
@@ -788,17 +788,18 @@ let Utils = {
 
   mpLocked: function mpLocked() {
     let modules = Cc["@mozilla.org/security/pkcs11moduledb;1"].
                   getService(Ci.nsIPKCS11ModuleDB);
     let sdrSlot = modules.findSlotByName("");
     let status  = sdrSlot.status;
     let slots = Ci.nsIPKCS11Slot;
 
-    if (status == slots.SLOT_READY || status == slots.SLOT_LOGGED_IN)
+    if (status == slots.SLOT_READY || status == slots.SLOT_LOGGED_IN
+                                   || status == slots.SLOT_UNINITIALIZED)
       return false;
 
     if (status == slots.SLOT_NOT_LOGGED_IN)
       return true;
     
     // something wacky happened, pretend MP is locked
     return true;
   },