if (!t) { return NULL; } rvTrust = cert_trust_from_stan_trust(t, cc->arena);
rvTrust = cert_trust_from_stan_trust(&t, cc->arena);
nssTrust_GetCERTCertTrustForCert(NSSCertificate *c, CERTCertificate *cc){    CERTCertTrust *rvTrust;    NSSTrustDomain *td = STAN_GetDefaultTrustDomain();    NSSToken *tok;    NSSTrust *tokenTrust;    NSSTrust *t = NULL;    nssListIterator *tokens;    int lastTrustOrder, myTrustOrder;    tokens = nssList_CreateIterator(td->tokenList);    if (!tokens) return NULL;    lastTrustOrder = 1<<16; /* just make it big */    for (tok  = (NSSToken *)nssListIterator_Start(tokens);         tok != (NSSToken *)NULL;         tok  = (NSSToken *)nssListIterator_Next(tokens))    {	tokenTrust = nssToken_FindTrustForCert(tok, NULL, c, 	                                       nssTokenSearchType_TokenOnly);	if (tokenTrust) {	    myTrustOrder = nsstoken_get_trust_order(tok);	    if (t) {		if (t->serverAuth == CKT_NETSCAPE_TRUST_UNKNOWN ||		     myTrustOrder < lastTrustOrder) {		    t->serverAuth = tokenTrust->serverAuth;		}		if (t->clientAuth == CKT_NETSCAPE_TRUST_UNKNOWN ||		     myTrustOrder < lastTrustOrder) {		    t->clientAuth = tokenTrust->clientAuth;		}		if (t->emailProtection == CKT_NETSCAPE_TRUST_UNKNOWN ||		     myTrustOrder < lastTrustOrder) {		    t->emailProtection = tokenTrust->emailProtection;		}		if (t->codeSigning == CKT_NETSCAPE_TRUST_UNKNOWN ||		     myTrustOrder < lastTrustOrder) {		    t->codeSigning = tokenTrust->codeSigning;		}		(void)nssPKIObject_Destroy(&tokenTrust->object);	    } else {		t = tokenTrust;	    }	    lastTrustOrder = myTrustOrder;	}    }    nssListIterator_Finish(tokens);    nssListIterator_Destroy(tokens);    if (!t) {	return NULL;    }    rvTrust = cert_trust_from_stan_trust(t, cc->arena);    if (!rvTrust) return NULL;    if (cc->slot && PK11_IsUserCert(cc->slot, cc, cc->pkcs11ID)) {	rvTrust->sslFlags |= CERTDB_USER;	rvTrust->emailFlags |= CERTDB_USER;	rvTrust->objectSigningFlags |= CERTDB_USER;    }    (void)nssPKIObject_Destroy(&t->object);    return rvTrust;}