On 08.12.2009, at 14:09, Aktiv Co. Aleksey Samsonov wrote: >> Any idea? > > C_CreateObject, C_FindObjectsInit, C_GenerateKeyPair, C_UnwrapKey : > > 1) if (pTemplate == NULL_PTR && ulCount > 0) { rv = CKR_ARGUMENTS_BAD; > > vs > > 2) if (pTemplate == NULL_PTR || ulCount == 0) { rv = CKR_ARGUMENTS_BAD;
Would calling with an empty template make sense? Doesn't seem so to me... so for safeguarding purposes or check for null/empty would do. Or the two checks could be combined. -- Martin Paljak http://martin.paljak.pri.ee +372.515.6495 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel