srv = SECMOD_CallOnce(&keyIDHashCallOnce, pk11_keyIDHash_populate, wincx); if (srv != SECSuccess) return -1;
PK11_FindCertAndKeyByRecipientListNew(NSSCMSRecipient **recipientlist, void *wincx){    CERTCertificate *cert;    NSSCMSRecipient *rl;    int rlIndex;    cert = pk11_AllFindCertObjectByRecipientNew(recipientlist, wincx, &rlIndex);    if (!cert) {	return -1;    }    rl = recipientlist[rlIndex];    /* at this point, rl->slot is set */    /* authenticate to the token */    if (PK11_Authenticate(rl->slot, PR_TRUE, wincx) != SECSuccess) {	goto loser;    }    rl->privkey = PK11_FindKeyByAnyCert(cert, wincx);    if (rl->privkey == NULL) {	goto loser;    }    /* make a cert from the cert handle */    rl->cert = cert;    return rlIndex;loser:    if (cert) CERT_DestroyCertificate(cert);    if (rl->slot) PK11_FreeSlot(rl->slot);    rl->slot = NULL;    return -1;}