nssrv = nssToken_TraverseCertificatesByNickname(token, NULL, name, &search);
if (nssToken_SearchCerts(token)) { nssrv = nssToken_TraverseCertificatesByNickname(token, NULL, name, &search); }
NSSTrustDomain_FindCertificatesByNickname(  NSSTrustDomain *td,  NSSUTF8 *name,  NSSCertificate *rvOpt[],  PRUint32 maximumOpt, /* 0 for no max */  NSSArena *arenaOpt){    NSSCertificate **rvCerts = NULL;    NSSToken *token;    PRUint32 count;    PRStatus nssrv;    nssList *nameList;    struct collect_arg_str ca;    nssTokenCertSearch search;    /* set up the collection */    nameList = nssList_Create(NULL, PR_FALSE);    (void)nssTrustDomain_GetCertsForNicknameFromCache(td, name, nameList);    ca.list = nameList;    ca.maximum = maximumOpt;    /* set the search criteria */    search.callback = collect_certs;    search.cbarg = &ca;    search.cached = nameList;    search.searchType = nssTokenSearchType_TokenOnly;    /* traverse the tokens */    for (token  = (NSSToken *)nssListIterator_Start(td->tokens);         token != (NSSToken *)NULL;         token  = (NSSToken *)nssListIterator_Next(td->tokens))    {	nssrv = nssToken_TraverseCertificatesByNickname(token, NULL, 	                                                name, &search);    }    nssListIterator_Finish(td->tokens);    count = nssList_Count(nameList);    if (maximumOpt > 0 && count > maximumOpt) count = maximumOpt;    if (count > 0) {	if (rvOpt) {	    nssList_GetArray(nameList, (void **)rvOpt, count);	    rvOpt[count] = NULL;	} else {	    rvCerts = nss_ZNEWARRAY(arenaOpt, NSSCertificate *, count + 1);	    nssList_GetArray(nameList, (void **)rvCerts, count);	}	nssTrustDomain_AddCertsToCache(td, rvCerts, count);    }    nssList_Destroy(nameList);    /* The return array assumes the references from the list */    return rvCerts;}