session = (sessionOpt) ? sessionOpt : tok->defaultSession; ccb.callback = callback; ccb.arg = arg; nssSession_EnterMonitor(session); rvstack = nsstoken_TraverseObjects(tok, session, cert_template, ctsize, examine_cert_callback, (void *)&ccb); nssSession_ExitMonitor(session); return rvstack;
nssrv = nssToken_FindCertificatesByTemplate(tok, sessionOpt, cert_template, ctsize, callback, arg); return NULL;
nssToken_TraverseCertificates(  NSSToken *tok,  nssSession *sessionOpt,  PRStatus (*callback)(NSSCertificate *c, void *arg),  void *arg){    PRStatus *rvstack;    nssSession *session;    struct certCallbackStr ccb;    CK_ATTRIBUTE cert_template[] = {	{ CKA_CLASS, g_ck_class_cert.data, g_ck_class_cert.size }    };    CK_ULONG ctsize = sizeof(cert_template) / sizeof(cert_template[0]);    session = (sessionOpt) ? sessionOpt : tok->defaultSession;    ccb.callback = callback;    ccb.arg = arg;    nssSession_EnterMonitor(session);    rvstack = nsstoken_TraverseObjects(tok, session, cert_template, ctsize,                                       examine_cert_callback, (void *)&ccb);    nssSession_ExitMonitor(session);    return rvstack;}