theTemplate[1].type = CKA_TOKEN; theTemplate[1].pValue = &ckTrue; theTemplate[1].ulValueLen = sizeof(ckTrue);
PK11_TraversePrivateKeysInSlot( PK11SlotInfo *slot,    SECStatus(* callback)(SECKEYPrivateKey*, void*), void *arg){    pk11KeyCallback perKeyCB;    pk11TraverseSlot perObjectCB;    CK_OBJECT_CLASS privkClass = CKO_PRIVATE_KEY;    CK_ATTRIBUTE theTemplate[1];    int templateSize = 1;    theTemplate[0].type = CKA_CLASS;    theTemplate[0].pValue = &privkClass;    theTemplate[0].ulValueLen = sizeof(privkClass);    if(slot==NULL) {        return SECSuccess;    }    perObjectCB.callback = pk11_DoKeys;    perObjectCB.callbackArg = &perKeyCB;    perObjectCB.findTemplate = theTemplate;    perObjectCB.templateCount = templateSize;    perKeyCB.callback = callback;    perKeyCB.callbackArg = arg;    perKeyCB.wincx = NULL;    return PK11_TraverseSlot(slot, &perObjectCB);}