nssList_GetArray(c->object.instanceList, (void **)&instance, 1);
for (ci  = (nssCryptokiInstance *)nssListIterator_Start(instances); ci != (nssCryptokiInstance *)NULL; ci  = (nssCryptokiInstance *)nssListIterator_Next(instances)) { if (!instance) { instance = ci; } else {  if (PK11_IsInternal(instance->token->pk11slot)) { instance = ci; } } } nssListIterator_Finish(instances);
get_cert_instance(NSSCertificate *c){    nssCryptokiInstance *instance;    instance = NULL;    nssList_GetArray(c->object.instanceList, (void **)&instance, 1);    return instance;}