Hello Juan Antonio,

On Mon, 2011-01-31 at 20:15 +0100, Juan Antonio Martinez wrote:
> Any hint to start debugging?

If you are using opensc-trunk, then try this one:

Index: pkcs11/framework-pkcs15.c
===================================================================
--- pkcs11/framework-pkcs15.c   (revision 5125)
+++ pkcs11/framework-pkcs15.c   (working copy)
@@ -2834,7 +2834,13 @@
        case CKA_MODULUS:
                return get_modulus(pubkey->pub_data, attr);
        case CKA_MODULUS_BITS:
-               return get_modulus_bits(pubkey->pub_data, attr);
+               if (pubkey->pub_info) {
+                       check_attribute_buffer(attr, sizeof(CK_ULONG));
+                       *(CK_ULONG *) attr->pValue = (CK_ULONG) 
pubkey->pub_info->modulus_length;
+                       return CKR_OK;
+               } else {
+                       return get_modulus_bits(pubkey->pub_data, attr);
+               }
        case CKA_PUBLIC_EXPONENT:
                return get_public_exponent(pubkey->pub_data, attr);
        case CKA_VALUE:

Regards
Andre

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to