if (c) { return STAN_GetCERTCertificate(c); } return NULL;
return c ? STAN_GetCERTCertificateOrRelease(c) : NULL;
CERT_FindCertByNicknameOrEmailAddr(CERTCertDBHandle *handle, char *name){    NSSCryptoContext *cc;    NSSCertificate *c, *ct;    CERTCertificate *cert;    NSSUsage usage;    if (NULL == name) {        PORT_SetError(SEC_ERROR_INVALID_ARGS);	return NULL;    }    usage.anyUsage = PR_TRUE;    cc = STAN_GetDefaultCryptoContext();    ct = NSSCryptoContext_FindBestCertificateByNickname(cc, name,                                                        NULL, &usage, NULL);    if (!ct && PORT_Strchr(name, '@') != NULL) {        char* lowercaseName = CERT_FixupEmailAddr(name);        if (lowercaseName) {	    ct = NSSCryptoContext_FindBestCertificateByEmail(cc, lowercaseName, 							    NULL, &usage, NULL);            PORT_Free(lowercaseName);        }    }    cert = PK11_FindCertFromNickname(name, NULL);    if (cert) {	c = get_best_temp_or_perm(ct, STAN_GetNSSCertificate(cert));	CERT_DestroyCertificate(cert);	if (ct) {	    CERTCertificate *cert2 = STAN_GetCERTCertificate(ct);            if (!cert2) {                return NULL;            }	    CERT_DestroyCertificate(cert2);	}    } else {	c = ct;    }    if (c) {	return STAN_GetCERTCertificate(c);    }    return NULL;}