if (ri->kind == RLSubjKeyID) continue; cert = PK11_FindCertByIssuerAndSNOnToken(slot, ri->id.issuerAndSN, pwarg);
if (ri->kind == RLSubjKeyID) { SECItem *derCert = CERT_FindDERCertBySubjKeyID(ri->id.subjectKeyID); if (derCert) { cert = PK11_FindCertFromDERCertItem(slot, derCert, pwarg); SECITEM_FreeItem(derCert, PR_TRUE); } } else { cert = PK11_FindCertByIssuerAndSNOnToken(slot, ri->id.issuerAndSN, pwarg); }
pk11_FindCertObjectByRecipientNew(PK11SlotInfo *slot, NSSCMSRecipient **recipientlist, int *rlIndex, void *pwarg){    NSSCMSRecipient *ri = NULL;    int i;    for (i=0; (ri = recipientlist[i]) != NULL; i++) {	CERTCertificate *cert = NULL;	/* XXXXX fixme - not yet implemented! */	if (ri->kind == RLSubjKeyID)	    continue;	cert = PK11_FindCertByIssuerAndSNOnToken(slot, ri->id.issuerAndSN, 								pwarg);	if (cert) {	    /* this isn't our cert */	    if ((cert->trust == NULL) ||       		((cert->trust->emailFlags & CERTDB_USER) != CERTDB_USER)) {		 CERT_DestroyCertificate(cert);		continue;	    }	    ri->slot = PK11_ReferenceSlot(slot);	    *rlIndex = i;	    return cert;	}    }    *rlIndex = -1;    return NULL;}