Hi,

here a little fix for  http://www.opensc-project.org/opensc/ticket/47

(More specifically, set the SIGNRECOVER and VERIFYRECOVER
flags to false, untill some needs it and implements it.

Any objections?

----

Also about http://www.opensc-project.org/opensc/ticket/71: perhaps it's
better to add an --info option to pkcs15-init?

Cheers,
Stef

Index: framework-pkcs15.c
===================================================================
--- framework-pkcs15.c  (revision 3045)
+++ framework-pkcs15.c  (working copy)
@@ -2506,7 +2506,10 @@
              return CKR_ATTRIBUTE_TYPE_INVALID;

      check_attribute_buffer(attr, sizeof(CK_BBOOL));
-       *(CK_BBOOL*)attr->pValue = (usage & mask)? TRUE : FALSE;
+ if (mask == SC_PKCS15_PRKEY_USAGE_VERIFYRECOVER || mask == SC_PKCS15_PRKEY_USAGE_SIGNRECOVER) + *(CK_BBOOL*)attr->pValue = FALSE; /* Signatures with data recovery aren't implemented */
+       else
+               *(CK_BBOOL*)attr->pValue = (usage & mask)? TRUE : FALSE;

      return CKR_OK;
}


_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to