reading page 136 of the pkcs11 specs, i read that i setup a template with attributes to match in a following C_FindObjects.
please consider this template where i load 6 attribtes, 0 - 5. CK_ATTRIBUTE Template[] = { {CKA_CLASS, &data_class, sizeof(CK_OBJECT_CLASS)}, {CKA_APPLICATION, (void *)"Application", sizeof("Application") -1}, {CKA_LABEL, (void *)"card_data", sizeof("card_data" -1) }, {CKA_PRIVATE, &bPinCodeProtected, sizeof(CK_BBOOL)}, {CKA_TOKEN, &bTrue, sizeof(CK_BBOOL)}, {CKA_VALUE, card_data, sizeof(card_data_t)} }; CK_ULONG ulCount = sizeof(Template) / sizeof(CK_ATTRIBUTE); Template[ulCount - 1].ulValueLen = sizeof(card_data_t); printf( "C_FindObjects [%ld] ul=%ld sz=%ld\n" , ulCount - 1, Template[ulCount - 1].ulValueLen); * rv = C_FindObjectsInit( g_session, Template, ulCount - 1);* i compute 6 elements total, But then in the C_FindObjectsInit, i pass ulCount - 1 and i get no matches. should i be doing * rv = C_FindObjectsInit( g_session, Template, ulCount );* am i doing this wrong? Tia, jackc
_______________________________________________ Opendnssec-user mailing list Opendnssec-user@lists.opendnssec.org https://lists.opendnssec.org/mailman/listinfo/opendnssec-user