nsresult nsKeygenFormProcessor::GetSlot(uint32_t aMechanism, PK11SlotInfo** aSlot) { nsNSSShutDownPreventionLock locker; if (isAlreadyShutDown()) { return NS_ERROR_NOT_AVAILABLE; } return GetSlotWithMechanism(aMechanism, m_ctx, aSlot, locker); }
// nsPKCS12Blob::SetToken // // Set the token to use for import/export nsresult nsPKCS12Blob::SetToken(nsIPK11Token *token) { nsNSSShutDownPreventionLock locker; nsresult rv = NS_OK; if (token) { mToken = token; } else { PK11SlotInfo *slot; rv = GetSlotWithMechanism(CKM_RSA_PKCS, mUIContext,&slot); if (NS_FAILED(rv)) { mToken = 0; } else { mToken = new nsPK11Token(slot); PK11_FreeSlot(slot); } } mTokenSet = true; return rv; }
nsresult nsKeygenFormProcessor::GetSlot(uint32_t aMechanism, PK11SlotInfo** aSlot) { return GetSlotWithMechanism(aMechanism,m_ctx,aSlot); }