Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-10 Thread Aktiv Co. Aleksey Samsonov
Hello, Committed at trunk revision 3891. ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel

Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Aleksey Samsonov
> CK_MECHANISM gostMech = { CKM_GOSTR3410_KEY_PAIR_GEN, NULL, 0 }; > ... > C_GenerateKeyPair(hSession, &gostMech, NULL_PTR, 0, NULL_PTR, 0, > &hPubKey, &hPrvKey); > -> CKR_OK and RSA Key Pair Fix at trunk revision 3887(+3888) But CK_MECHANISM pMech = { CKM_RSA_PKCS_KEY_PAIR_GEN, NULL, 0 }; ...

Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Aktiv Co. Aleksey Samsonov
Aktiv Co. Aleksey Samsonov: > or > 1. no for the present and to try further (that'll do > CKR_TEMPLATE_INCOMPLETE, CKR_OK and etc) Incidentally: CK_MECHANISM gostMech = { CKM_GOSTR3410_KEY_PAIR_GEN, NULL, 0 }; ... C_GenerateKeyPair(hSession, &gostMech, NULL_PTR, 0, NULL_PTR, 0, &hPubKey, &hPrvKe

Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Aktiv Co. Aleksey Samsonov
Hi Martin, Martin Paljak: > 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 |

Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Martin Paljak
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_ARGUM

Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Aktiv Co. Aleksey Samsonov
> 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; ? ___ opensc-devel mail

Re: [opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Andreas Jellinghaus
Am Dienstag 08 Dezember 2009 09:41:37 schrieb Aktiv Co. Aleksey Samsonov: > Hello, > I propose a patch for PKCS#11 > > Fix: any of these calls ... > => > Segmentation fault great work! please go ahead and commit! Thanks, Andreas ___ opensc-devel mailin

[opensc-devel] PKCS#11 and check parameters for NULL_PTR

2009-12-08 Thread Aktiv Co. Aleksey Samsonov
Hello, I propose a patch for PKCS#11 Fix: any of these calls C_CreateObject(hSession, NULL_PTR, 1, NULL_PTR); C_GetAttributeValue(hSession, hObject, NULL_PTR, 1); C_SetAttributeValue(hSession, hObject, NULL_PTR, 1); C_FindObjectsInit(hSession, NULL_PTR, 1); C_FindObjects(hSession, NULL_PTR, 0, NU