nssListIterator *iter; nssList *subjectList;
nssTrustDomain_GetCertsForEmailAddressFromCache(  NSSTrustDomain *td,  NSSASCII7 *email,  nssList *certListOpt){    NSSCertificate **rvArray = NULL;    cache_entry *ce;    nssList *collectList = NULL;#ifdef DEBUG_CACHE    PR_LOG(s_log, PR_LOG_DEBUG, ("looking for cert by email %s", email));#endif    PZ_Lock(td->cache->lock);    ce = (cache_entry *)nssHash_Lookup(td->cache->email, email);    if (ce) {	ce->hits++;	ce->lastHit = PR_Now();#ifdef DEBUG_CACHE	PR_LOG(s_log, PR_LOG_DEBUG, ("... found, %d hits", ce->hits));#endif    }    PZ_Unlock(td->cache->lock);    if (ce) {	nssListIterator *iter;	nssList *subjectList;	if (certListOpt) {	    collectList = certListOpt;	} else {	    collectList = nssList_Create(NULL, PR_FALSE);	}	iter = nssList_CreateIterator(ce->entry.list);	for (subjectList  = (nssList *)nssListIterator_Start(iter);	     subjectList != (nssList *)NULL;	     subjectList  = (nssList *)nssListIterator_Next(iter)) {	    (void)collect_subject_certs(subjectList, collectList);	}	nssListIterator_Finish(iter);	nssListIterator_Destroy(iter);    }    if (!certListOpt && collectList) {	PRUint32 count = nssList_Count(collectList);	rvArray = nss_ZNEWARRAY(NULL, NSSCertificate *, count);	if (rvArray) {	    nssList_GetArray(collectList, (void **)rvArray, count);	}	nssList_Destroy(collectList);    }    return rvArray;}