[Opendnssec-user] proper C_FindObjectsInit
    Jack Craig 
    jack.craig.aptos at gmail.com
       
    Thu Jan 16 23:00:33 UTC 2014
    
    
  
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendnssec.org/pipermail/opendnssec-user/attachments/20140116/502c6d13/attachment.htm>
    
    
More information about the Opendnssec-user
mailing list