if (c) { rvCert = STAN_GetCERTCertificate(c); } return rvCert;
return c ? STAN_GetCERTCertificateOrRelease(c) : NULL;
PK11_FindCertFromDERCertItem(PK11SlotInfo *slot, SECItem *inDerCert,								 void *wincx){    CERTCertificate *rvCert = NULL;    NSSCertificate *c;    NSSDER derCert;    NSSToken *tok;    NSSTrustDomain *td = STAN_GetDefaultTrustDomain();    SECStatus rv;    tok = PK11Slot_GetNSSToken(slot);    NSSITEM_FROM_SECITEM(&derCert, inDerCert);    rv = pk11_AuthenticateUnfriendly(slot, PR_TRUE, wincx);    if (rv != SECSuccess) {	PK11_FreeSlot(slot);	return NULL;    }    c = NSSTrustDomain_FindCertificateByEncodedCertificate(td, &derCert);    if (c) {	PRBool isToken = PR_FALSE;	NSSToken **tp;	NSSToken **tokens = nssPKIObject_GetTokens(&c->object, NULL);	if (tokens) {	    for (tp = tokens; *tp; tp++) {		if (*tp == tok) {		    isToken = PR_TRUE;		    break;		}	    }	    if (!isToken) {		NSSCertificate_Destroy(c);		c = NULL;	    }	    nssTokenArray_Destroy(tokens);	}    }    if (c) {	rvCert = STAN_GetCERTCertificate(c);    }    return rvCert;} 