nssrv = nssToken_ImportCertificate(internal, NULL, c, PR_TRUE);
nssrv = nssToken_ImportCertificate(internal, NULL, c, stanNick, PR_TRUE);
__CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname,		       CERTCertTrust *trust){    PRStatus nssrv;    PK11SlotInfo *slot;    NSSToken *internal;    NSSCryptoContext *context;    NSSCertificate *c = STAN_GetNSSCertificate(cert);    context = c->object.cryptoContext;    if (!context) {	return PR_FAILURE; /* wasn't a temp cert */    }    if (c->nickname && strcmp(nickname, c->nickname) != 0) {	nss_ZFreeIf(c->nickname);	PORT_Free(cert->nickname);	c->nickname = NULL;    }    if (!c->nickname) {	c->nickname = nssUTF8_Duplicate((NSSUTF8 *)nickname, c->object.arena);	cert->nickname = PORT_Strdup(nickname);    }    /* Delete the temp instance */    nssCertificateStore_Remove(context->certStore, c);    c->object.cryptoContext = NULL;    /* the perm instance will assume the reference */    nssList_Clear(c->object.instanceList, NULL);    /* Import the perm instance onto the internal token */    slot = PK11_GetInternalKeySlot();    internal = PK11Slot_GetNSSToken(slot);    nssrv = nssToken_ImportCertificate(internal, NULL, c, PR_TRUE);    if (nssrv != PR_SUCCESS) {	return SECFailure;    }    /* reset the CERTCertificate fields */    cert->nssCertificate = NULL;    cert = STAN_GetCERTCertificate(c); /* will return same pointer */    cert->istemp = PR_FALSE;    cert->isperm = PR_TRUE;    return (STAN_ChangeCertTrust(cert, trust) == PR_SUCCESS) ? 							SECSuccess: SECFailure;}