return CK_INVALID_HANDLE;
return NULL;
pk11_AllFindCertObjectByRecipient(PK11SlotInfo **slotPtr, 	SEC_PKCS7RecipientInfo **recipientArray,SEC_PKCS7RecipientInfo **rip,							void *wincx) {    PK11SlotList *list;    PK11SlotListElement *le;    CK_OBJECT_HANDLE certHandle = CK_INVALID_HANDLE;    PK11SlotInfo *slot = NULL;    SECStatus rv;    *slotPtr = NULL;    /* get them all! */    list = PK11_GetAllTokens(CKM_INVALID_MECHANISM,PR_FALSE,PR_TRUE,wincx);    if (list == NULL) {	if (list) PK11_FreeSlotList(list);    	return CK_INVALID_HANDLE;    }    *rip = NULL;    /* Look for the slot that holds the Key */    for (le = list->head ; le; le = le->next) {	if ( !PK11_IsFriendly(le->slot)) {	    rv = PK11_Authenticate(le->slot, PR_TRUE, wincx);	    if (rv != SECSuccess) continue;	}	certHandle = pk11_FindCertObjectByRecipient(le->slot,							recipientArray,rip);	if (certHandle != CK_INVALID_HANDLE) {	    slot = PK11_ReferenceSlot(le->slot);	    break;	}    }    PK11_FreeSlotList(list);    if (slot == NULL) {	return CK_INVALID_HANDLE;    }    *slotPtr = slot;    return certHandle;}