nssrv = nssToken_TraverseCertificatesByNickname(token, NULL, name, &search);
if (nssToken_SearchCerts(token)) { nssrv = nssToken_TraverseCertificatesByNickname(token, NULL, name, &search); }
NSSTrustDomain_FindBestCertificateByNickname(  NSSTrustDomain *td,  NSSUTF8 *name,  NSSTime *timeOpt, /* NULL for "now" */  NSSUsage *usage,  NSSPolicies *policiesOpt /* NULL for none */){    PRStatus nssrv;    NSSToken *token;    nssTokenCertSearch search;    nssBestCertificateCB best;    nssList *nameList;    /* set the criteria for determining the best cert */    nssBestCertificate_SetArgs(&best, timeOpt, usage, policiesOpt);    /* find all matching certs in the cache */    nameList = nssList_Create(NULL, PR_FALSE);    (void)nssTrustDomain_GetCertsForNicknameFromCache(td, name, nameList);    /* set the search criteria */    search.callback = nssBestCertificate_Callback;    search.cbarg = &best;    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);    nssList_Clear(nameList, cert_destructor);    nssList_Destroy(nameList);    if (best.cert) {	nssTrustDomain_AddCertsToCache(td, &best.cert, 1);    }    return best.cert;}