} else {  nssCryptokiInstance *tokenInstance, *instance; nssList_GetArray(cp->object.instanceList, (void **)&tokenInstance, 1); instance = nssCryptokiInstance_Create(c->object.arena, token, tokenInstance->handle, PR_TRUE); nssList_Add(c->object.instanceList, instance); nssListIterator_Destroy(c->object.instances); c->object.instances = nssList_CreateIterator(c->object.instanceList);
cache_token_cert(NSSCertificate *c, void *arg){    NSSToken *token = (NSSToken *)arg;    NSSTrustDomain *td = STAN_GetDefaultTrustDomain();    NSSCertificate *cp = nssCertificate_AddRef(c);    if (nssList_Count(token->certList) > NSSTOKEN_MAX_LOCAL_CERTS) {	nssToken_DestroyCertList(token, PR_TRUE);	/* terminate the traversal */	return PR_FAILURE;    }    nssTrustDomain_AddCertsToCache(td, &c, 1);    if (cp == c) {	NSSCertificate_Destroy(cp);    }    /* This list reference persists with the token */    nssList_Add(token->certList, nssCertificate_AddRef(c));    /* The cert needs to become external (made into a CERTCertificate)     * in order for it to be properly released.     * Force an update of the nickname and slot fields.     */    (void)stan_GetCERTCertificate(c, PR_TRUE);    return PR_SUCCESS;}