Actually, I have already tested a simpler modification, I replaced the line
  reader->active_protocol = pcsc_proto_to_opensc(SCARD_PROTOCOL_T0);
with
  reader->active_protocol = pcsc_proto_to_opensc(SCARD_PROTOCOL_T1);
but it produced the same problem, though I could only test it under XP,
so I will apply your patch and do a full testing under Win7 too.

I found another problem in the source code, which causes a null pointer
error with CardOS cards (asn1.c:1003, debug message, which was changed
since the 0.11 version). I will test it and post a patch.

Best Regards
Jozsef

francois.lebl...@cev-sa.com wrote:
>
> Can you try this patch to see if the trouble is coming from T1 support,
>
> Regards
>
> François.
> ------------------------------------------------------------------------
> *François Leblanc*
> Service Recherche et Innovation_
> __francois.lebl...@cev-sa.com_ <mailto:francois.lebl...@cev-sa.com>
> Tél.  : 02.33.77.65.00
> Fax  : 02.33.77.65.01_
> __www.cev-sa.com_
>       
>
> Avant d'imprimer, pensez à l'environnement
> <www.cev-sa.com>
>
>
>
>
>
> De :  Jozsef Dojcsak <d...@t-online.hu>
> A:    francois.lebl...@cev-sa.com
> Cc :  opensc-devel@lists.opensc-project.org
> Date:         29/04/2010 14:34
> Objet :       Re: [opensc-devel] Cardmod MiniDriver Problem
>
>
> ------------------------------------------------------------------------
>
>
>
> Hello François,
> thank you for the hint, it is then likely that the unsupported T=1 mode
> causes our problem.
>
> The partial success means: the cardmod DLL is loaded correctly by
> "certutil -SCInfo", but after the OpenSC context creation (right after
> the "[cardmod] reader-pcsc.c:1815:cardmod_detect_readers: returning
> with: 0") it hangs on XP and raises a warning ("like card is not
> supported") on Win7.
>
> My test card is a Siemens CardOS 4.3B, and it does not work with the
> pkcs15-tool in T=0 mode, only in T=1. Please see the attached inf file,
> used on Win7 to install the mini-driver.
>
> Is there a reason to support T0 only in the cardmod reader driver?
>
> Kind Regards
> Jozsef
>
> francois.lebl...@cev-sa.com wrote:
> > Hello Jozsef,
> >
> > cardmod is still experimental module but it should at end work with
> > all cards supported by opensc,
> >
> > for now I only test it on win7 with westcos card (that is my working
> > configuration).
> >
> > So you need and you do it to add your ATR on configuration file
> > yourself, Perhaps can you send
> >
> > me your ATR/ATRmask and the configuration file you set, I will have a
> > look.
> >
> > An other point it's the support for T0 only protocol so if your card
> > is T1 this doesn't work for now...
> >
> > When you said "it did not really worked" what do you mean?
> >
> > Hope I will help,
> >
> > François.
> >
> >
> >
> > First of all many thanks to Francois and Martin for their help! As I
> > wrote, I managed to compile the cardmod mini driver with MSVC9 and later
> > I also did cross-compile it on Linux. Then I tested the driver on both
> > XP and Win7 with partial success, since I don't have a Westcos card..
> >
> > And my last question in this topic: Is this mini driver intended for
> > Westcos cards only, or it should work with any other PKCS15/OpenSC
> > compatible cards? (Well, I customized the ATR for other cards, but it
> > did not really worked)
> >
> > Cheers
> > Jozsef
> >
>
>
> [Version]
> Signature="$Windows NT$"
> Class=SmartCard
> ClassGuid={990A2BD7-E738-46c7-B26F-1CF8FB9F1391}
> Provider=%ProviderName%
> CatalogFile=delta.cat
> DriverVer=05/02/2010,0,12,0,0
>
> [Manufacturer]
> %ProviderName%=Minidriver,NTamd64,NTamd64.6.1,NTx86,NTx86.6.1
>
> [Minidriver.NTamd64]
> %CardDeviceName%=Minidriver64_Install,SCFILTER\CID_00640181010c829000
>
> [Minidriver.NTx86]
> %CardDeviceName%=Minidriver32_Install,SCFILTER\CID_c808
>
> [Minidriver.NTamd64.6.1]
> %CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_00640181010c829000
>
> [Minidriver.NTx86.6.1]
> %CardDeviceName%=Minidriver32_61_Install,SCFILTER\CID_c808
>
> [DefaultInstall]
> CopyFiles=x86_CopyFiles
> AddReg=AddRegDefault
>
> [DefaultInstall.ntamd64]
> CopyFiles=amd64_CopyFiles
> CopyFiles=wow64_CopyFiles
> AddReg=AddRegWOW64
> AddReg=AddRegDefault
>
> [DefaultInstall.NTx86]
> CopyFiles=x86_CopyFiles
> AddReg=AddRegDefault
>
> [DefaultInstall.ntamd64.6.1]
> AddReg=AddRegWOW64
> AddReg=AddRegDefault
>
> [DefaultInstall.NTx86.6.1]
> AddReg=AddRegDefault
>
> [SourceDisksFiles]
> %SmartCardCardModule%=1
> %SmartCardCardModule64%=1
>
> [SourceDisksNames]
> 1 = %MediaDescription%
>
> [Minidriver64_Install.NT]
> CopyFiles=amd64_CopyFiles
> CopyFiles=wow64_CopyFiles
> AddReg=AddRegWOW64
> AddReg=AddRegDefault
>
> [Minidriver64_61_Install.NT]
> AddReg=AddRegWOW64
> AddReg=AddRegDefault
> Include=umpass.inf
> Needs=UmPass
>
> [Minidriver32_Install.NT]
> CopyFiles=x86_CopyFiles
> AddReg=AddRegDefault
>
> [Minidriver32_61_Install.NT]
> AddReg=AddRegDefault
> Include=umpass.inf
> Needs=UmPass
>
> [Minidriver64_61_Install.NT.Services]
> Include=umpass.inf
> Needs=UmPass.Services
>
> [Minidriver32_61_Install.NT.Services]
> Include=umpass.inf
> Needs=UmPass.Services
>
>
> [Minidriver64_61_Install.NT.HW]
> Include=umpass.inf
> Needs=UmPass.HW
>
> [Minidriver64_61_Install.NT.CoInstallers]
> Include=umpass.inf
> Needs=UmPass.CoInstallers
>
>
> [Minidriver64_61_Install.NT.Interfaces]
> Include=umpass.inf
> Needs=UmPass.Interfaces
>
>
> [Minidriver32_61_Install.NT.HW]
> Include=umpass.inf
> Needs=UmPass.HW
>
> [Minidriver32_61_Install.NT.CoInstallers]
> Include=umpass.inf
> Needs=UmPass.CoInstallers
>
>
> [Minidriver32_61_Install.NT.Interfaces]
> Include=umpass.inf
> Needs=UmPass.Interfaces
>
>
> [amd64_CopyFiles]
> ;%SmartCardCardModule%,%SmartCardCardModule64%
>
> [x86_CopyFiles]
> ;%SmartCardCardModule%
>
> [wow64_CopyFiles]
> ;%SmartCardCardModule64%
>
> [AddRegWOW64]
> HKLM,
> %SmartCardNameWOW64%,"ATR",0x00000001,3f,69,00,00,00,64,01,00,00,00,80,90,00
> HKLM,
> %SmartCardNameWOW64%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,00,00,00,f0,ff,ff
> HKLM, %SmartCardNameWOW64%,"Crypto Provider",0x00000000,"Microsoft
> Base Smart Card Crypto Provider"
> HKLM, %SmartCardNameWOW64%,"Smart Card Key Storage
> Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
> HKLM, %SmartCardNameWOW64%,"80000001",0x00000000,%SmartCardCardModule64%
>
> [AddRegDefault]
> HKLM,
> %SmartCardName%,"ATR",0x00000001,3b,f2,18,00,02,c1,0a,31,fe,58,c8,08,74
> HKLM,
> %SmartCardName%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
> HKLM, %SmartCardName%,"Crypto Provider",0x00000000,"Microsoft Base
> Smart Card Crypto Provider"
> HKLM, %SmartCardName%,"Smart Card Key Storage
> Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
> HKLM, %SmartCardName%,"80000001",0x00000000,%SmartCardCardModule%
>
> [DestinationDirs]
> amd64_CopyFiles=10,system32
> x86_CopyFiles=10,system32
> wow64_CopyFiles=10,syswow64
>
>
> ; =================== Generic ==================================
>
> [Strings]
> ProviderName ="Opensc"
> MediaDescription="Opensc Smart Card Minidriver Installation Disk"
> CardDeviceName="Opensc Minidriver for Smart Card"
> SmartCardName="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Siemens
> CardOS V4.3B"
> SmartCardNameWOW64="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Cev
> Westcos"
> SmartCardCardModule="opensc-cardmod32.dll"
> SmartCardCardModule64="opensc-cardmod64.dll"
>
>
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to