yuri-moens / eid-mw

Automatically exported from code.google.com/p/eid-mw
GNU Lesser General Public License v3.0
0 stars 1 forks source link

PKCS11: C_Sign_Final() wrongly returns "Operation not initialized" #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Given the following:

   mechanism = CKM_SHA1_RSA_PKCS
   private key modulus lenth = 1024 or 2048 bit 

2. use the following code sequence:

   CheckCKR(C_Sign_Init(hSession, pMechanism, hKey));
   CheckCKR(C_Sign_Update(hSession, pData, udlen); 
   CheckCKR(C_SignFinal(hSession, null, &size));
   BYTE *pSig = malloc(size);
   CheckCKR(C_SignFinal(hSession, psig, &size));
.

What is the expected output? What do you see instead?

Expected: the last C_SignFinal() call returns the signature
Actual: error "Operation not initialized".

What version of the product are you using? On what operating system?

- Eid Middleware: Unofficial Windows 4.0.0.7142 QI
- OS: Windows 7 Enterprise 64 bit

Please provide any additional information below.

With a 2048 bit modulus the first C_SignFinal also reports a wrong signature 
size 

Original issue reported on code.google.com by Danny.He...@gmail.com on 25 Jan 2012 at 8:09

GoogleCodeExporter commented 9 years ago
Hi Danny, 

Thanks for the report, I'll fix this and let you know when an updated installer 
is available

Original comment by frederik...@gmail.com on 25 Jan 2012 at 9:05

GoogleCodeExporter commented 9 years ago
Thanks Frederik!

Danny

Original comment by Danny.He...@gmail.com on 25 Jan 2012 at 10:55

GoogleCodeExporter commented 9 years ago
Fixed for 1024 bit keys (2048 bit key cards we have, state modulus 1024 in 
prkDF )
(also a wrong check in our cal_sign, that hasn't been removed in this version)

Original comment by frederik...@gmail.com on 21 Feb 2012 at 2:00

GoogleCodeExporter commented 9 years ago

Original comment by frederik...@gmail.com on 18 Apr 2012 at 1:54

GoogleCodeExporter commented 9 years ago
This issue should be fixed in current releases of the eID middleware.

If not, feel free to open a new issue on our github project:

https://github.com/Fedict/eid-mw

Original comment by wouter.v...@fedict.be on 20 Mar 2015 at 11:46