Hello,
"Douglas E. Engert" <deeng...@anl.gov> a écrit sur 28/01/2011 23:24:27 : > [image supprimée] > > Some basic questions about the reader-pcscs.c modifications for cardmod > > Douglas E. Engert > > A : > > OpenSC-devel, François Leblanc > > 28/01/2011 23:26 > > > Other CSPs have been able to use the OpenSC opensc-pkcs11.dll > which uses the standard reader-pcsc.c code. This would imply that > they let reader-pcsc.c get its own handles to the card, and don't > use the one provided by the caller of the CSP. > > So why does cardmod require so many modifications to reader-pcsc.c? This already answer but I can tell it again: So if you build a complete "CSP" you manage all the card, open context, power on card (so get handle on card) etc etc. You have to provide all cryptographics functions too defined in a CSP (CryptAcquireContext , CryptImportKey, etc etc). It's like developing a complete pkcs11 librairie. Moreover you have to make sign this "CSP" by Microsoft to be available and it's annoying point. So with this method you can use a pkcs11 dll working. If you use BaseCSP, this module provide basic "CSP" functionnalities ( CryptImportKey , etc) and you only need to provide a dll that manage your card with a defined API to access cryptographics functions of the card, in fact it's BaseCSP.dll witch detect the card and lunch your dll to access to the card. In this method you don't have developping all cryptographics functions, and more over you don't have to sign the dll. The bad side it(s like it is BaseCSP detecting card insertion, and manage the card, it's BaseCSP module who create context and power_on the card. At this point your card is loocked by BaseCSP module. BaseCSP module provide to your dll card context and handle to let you access your card. So the goal in this method it's to get card context and handle from BaseCSP to access card, it's why pcsc_reader code is modified since the standard way it's to create a context and power on card witch give you a card handle... Summary: CSP: + : use pkcs11 module, généric -: Hard to code, need to dévelop all cryptographics functions, need to be signed by Microsoft. BaseCSP: +: More easy, ligth API to develop -: Need to use provided card handle and card context. > > The modifications also turn off: detect_card_presents, lock unlock, > release, wait_for_event and reset. I would expect some of these to > be critical to any CSP or mini-driver? > Hum I've to see exactly but like I describe it's the BaseCSP module which manage the card, so some function can be uncompatible with BaseCSP module. > Why does the cardmod reader-pcsc.c need to load the constant > winscard.dll, when the normal pcsc code loads the DEFAULT_PCSC_PROVIDER Since cardmod it's used in windows environnement only it can use only winscard.dll. > that is defined in the Configure/Makefiles as winscard.dll? > > -- > > Douglas E. Engert <deeng...@anl.gov> > Argonne National Laboratory > 9700 South Cass Avenue > Argonne, Illinois 60439 > (630) 252-5444 Regards, François. _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel