Further testing of the cardmod on Vista and XP showed that the BaseCSP may change the pCardData->hSCardCtx and pCardData->hScard while calling cardmod routines. For example if the user switches cards during login when they see they have the wrong card inserted.
The current cardmod code assumed that these would not change and would do a sc_context_create, sc_connect_card, sc_pkcs15_bind once in the CardAcquireContext routine. LoginUI.exe stresses cardmod, and may have multiple contexts open at the same time, and change the handles in a single session if a card is switched. Ticket #321 (See [1]) has a second patch [2] which will now check if hSCardCtx or hScard have changed, and do sc_pkcs15_unbind and sc_disconnect_card. It will then call sc_ctx_detect_readers with the new handles, sc_connect_card, sc_pkcs15_bind and reread the pkcs15 objects from the new card. The cardmod_detect_readers was change to call _sc_delete_reader to remove the previous reader, if any, before adding any new reader. _sc_delete_reader is a new routine, that will also be used in sc_release_context to delete all the readers. I plan to commit the _sc_delete_reader as seperate patch. Internet Explorer authentication to a web site may use hashAlg == CALG_SSL3_SHAMD5. Code was added to use the SC_ALGORITHM_RSA_HASH_MD5_SHA1. On XP I am using the BaseCSP see [3]. [1] http://www.opensc-project.org/opensc/ticket/321 [2] http://www.opensc-project.org/opensc/attachment/ticket/321/cardmod.mega.20110203.patch [3] http://support.microsoft.com/kb/909520 -- Douglas E. Engert <deeng...@anl.gov> Argonne National Laboratory 9700 South Cass Avenue Argonne, Illinois 60439 (630) 252-5444 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel