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 read-only session

2009-12-08 Thread Aktiv Co. Aleksey Samsonov
Martin Paljak: > I don't think that obvious fixes for spec conformance need any vetting > period. +1 anyway. Thanks. Committed at trunk revision 3886. ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mail

Re: [opensc-devel] PKCS11 signing does not work on Ubuntu

2009-12-08 Thread Andreas Jellinghaus
Am Dienstag 08 Dezember 2009 13:39:29 schrieb Dominik Fischer: > Why do I think it should work: Under RHEL5 it works with the same card and > the following software versions: * opensc-0.11.1 > * ccid-1.0.1 > * pcsc-lite-1.3.1-7 > > Are there any changes (since these versions) regarding signin

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 read-only session

2009-12-08 Thread Martin Paljak
Hi Aleksey, On 08.12.2009, at 13:23, Aktiv Co. Aleksey Samsonov wrote: > I propose a patch for PKCS#11 > > Fix: return CKR_SESSION_READ_ONLY from C_InitPIN, C_SetPIN, C_CreateObject, > C_CopyObject, C_DestroyObject, C_SetAttributeValue, C_GenerateKey, > C_GenerateKeyPair, C_UnwrapKey, C_DeriveK

[opensc-devel] PKCS#11 and read-only session

2009-12-08 Thread Aktiv Co. Aleksey Samsonov
Hello, I propose a patch for PKCS#11 Fix: return CKR_SESSION_READ_ONLY from C_InitPIN, C_SetPIN, C_CreateObject, C_CopyObject, C_DestroyObject, C_SetAttributeValue, C_GenerateKey, C_GenerateKeyPair, C_UnwrapKey, C_DeriveKey if session is read-only. PKCS#11: "C_InitPIN can only be called in t

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