Thanks in advance for the help :)
It would be fantastic if someone can tell me how to start with this library.
Thanks :)
--
You received this message because you are subscribed to the Google Groups "Pkcs11Interop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pkcs11intero...@googlegroups.com.
To post to this group, send email to pkcs11...@googlegroups.com.
Visit this group at http://groups.google.com/group/pkcs11interop.
Where am I doing wrong? Thanks for the help anyway :)
Ok it was the wrong library.. However a question, with the "pkcs11interop" library am i able to sign on the card (so the private key stay inside the card)?
Thanks, Regards, Daniele
bool done = false;
while (!done) {
try {
// Init session object
session = slot.OpenSession (false);
// Session Login
CKU userType = CKU.CKU_USER;
session.Login (userType, _cardPin);
} catch (Net.Pkcs11Interop.Common.Pkcs11Exception e) {
if (e.RV != CKR.CKR_DEVICE_ERROR) {
return false;
}
ui.Debug ("Error accessing token, trying again...");
} finally {
ui.Debug ("Access done...");
done = true;
}
}
Then I get this error "CKR_SESSION_HANDLE_INVALID" when it give the "Error accessing token, trying again..." debug message
Ok, finally I have been able to make my first c# application, it read a cert from a smart card and then it sign a token, it works perfectly,
however sometimes when i start the app it give me this error "CKR_DEVICE_ERROR" but can't understand why because if i restart the app it works. How can i solve/ avoid that?
If i try doing something like this:
bool done = false;
while (!done) {
try {
// Init session object
session = slot.OpenSession (false);
// Session Login
CKU userType = CKU.CKU_USER;
session.Login (userType, _cardPin);
} catch (Net.Pkcs11Interop.Common.Pkcs11Exception e) {
if (e.RV != CKR.CKR_DEVICE_ERROR) {
return false;
}
Regards, Daniele Buso