On Thu, Oct 9, 2008 at 6:19 PM, Douglas E. Engert <[EMAIL PROTECTED]> wrote: > It looks like CKF_TOKEN_PRESENT is set in framework-pkcs15init.c > (if initilizing cards), and in framework-pkcs15.c. > pkcs15_create_tokens calls in pkcs15_create_slot > for the first slot which sets the flag. pkcs15_create_tokens > will set the flag for read/write slots if in hide_empty_tokens is not set. > > So what I think should also happen is in slot_get_token, after > calling card_detect, it should test CKF_TOKEN_PRESENT > and return CKR_TOKEN_NOT_PRESENT if not set. > > The attached patch does this. It includes yesterdays patch as well.
Applied in revision 3583. I hope it does not break applications. The slots where empty so not really useful anyway. > Some other comments on slots and readers. > > It appears that num_virtual_slots should equal the number of > readers * num_slots. > > SC_MAX_READERS is 16, SC_PKCS11_DEF_SLOTS_PER_CARD is 4. > SC_PKCS11_DEF_VIRTUAL_SLOTS is 8. > > The defaults in the opensc.conf have: > reader_drivers = openct, pcsc, ctapi; > reader_driver openct { readers = 5; } > num_virtual_slots = 8; > num_slots = 4; > > With num_virtual_slots = 8 and num_slots = 4 you can really only > have 2 readers. > > Should SC_PKCS11_DEF_VIRTUAL_SLOTS = > SC_MAX_READERS * SC_PKCS11_DEF_SLOTS_PER_CARD? > > > Maybe include some text in opensc.conf.in? Applied in revision 3584. Thanks -- Dr. Ludovic Rousseau _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel