Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem opensc minidriver #160

Closed
vanhonit opened this issue May 21, 2013 · 5 comments
Closed

Problem opensc minidriver #160

vanhonit opened this issue May 21, 2013 · 5 comments

Comments

@vanhonit
Copy link

Hi,
I use OpenSC 0.13 in Windows 7 64 bit system with Crypto Stick v1.2 and have the following problem:
- The smart card driver in Device Manager is not successfully installed after installing OpenSC with option full install .
opensc-minidriver
But OpenSC's tools (opensc-explorer, pkcs11-tool, ...) work properly.
- I try to configure by hand and create the Windows registry key "Crypto stick" and update driver with opensc-minidriver.inf file (see opensc-minidriver.inf content).Device manager have opensc driver.
after_install_driver
But when I use Internet Explorer to connect to startssl.com website to authenticate via certificate store in device,the result fails, this like error certificate not found but i'm sure certificate ready in Crypto stick. (see startssl.png).
startssl
opensc-minidriver content

[Version]
Signature="$Windows NT$"
Class=SmartCard
ClassGuid={990A2BD7-E738-46c7-B26F-1CF8FB9F1391}
Provider=%ProviderName%
CatalogFile=delta.cat
DriverVer=05/02/2010,@OPENSC_VERSION_MAJOR@,@OPENSC_VERSION_MINOR@,@OPENSC_VERSION_FIX@,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_00640181010c829000

[Minidriver.NTamd64.6.1]
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_00640181010c829000

[Minidriver.NTx86.6.1]
%CardDeviceName%=Minidriver32_61_Install,SCFILTER\CID_00640181010c829000

[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,3f,69,00,00,00,64,01,00,00,00,80,90,00
HKLM, %SmartCardName%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,00,00,00,f0,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"
SmartCardName="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Cev Westcos"
SmartCardNameWOW64="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Cev Westcos"
SmartCardCardModule="opensc-minidriver.dll"

Reg file conent [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Cryptostick] "80000001"="opensc-minidriver.dll" "Crypto Provider"="Microsoft Base Smart Card Crypto Provider" "ATR"=hex:3b,da,18,ff,81,b1,fe,75,1f,03,00,31,c5,73,c0,01,40,00,90,00,0c "ATRMask"=hex:ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
@ghost
Copy link

ghost commented Aug 9, 2013

Same issue for us at GOOZE.EU

The ePass2003 is available here:
https://download.gooze.eu/pki/opensc/windows/minidriver/exported-ePass2003.reg

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\OpenSC ePass2003 ECP]
"ATR"=hex:3b,9f,95,81,31,fe,9f,00,66,46,53,05,01,00,11,71,df,00,00,03,6a,82,f8
"ATRMask"=hex,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
"Crypto Provider"="Microsoft Base Smart Card Crypto Provider"
"Smart Card Key Storage Provider"="Microsoft Smart Card Key Storage Provider"
"80000001"="opensc-minidriver.dll"

But it does not work and is not recognized by Windows 7.

Therefore could some OpenSC core hacker explain how to format the registry file and register the ePass2003 mini-driver?

Kind regards,
Jean-Michel

@ghost
Copy link

ghost commented Aug 9, 2013

OK, I was missing the Wow6432Node part. Here is an update with ePass2003 and Feitian PKI reg content:
https://download.gooze.eu/pki/opensc/windows/minidriver/gooze.reg

@viktorTarasov
Copy link
Member

Sorry, I do not understand what is your problem?
Are you using the minidriver from the 'official' MSI (release or nightly build)?

I have no problems with the last nightly build MSI (https://opensc.fr/jenkins/view/OpenSC-master/job/OpenSC-master-Win32/lastSuccessfulBuild/artifact/opensc-0.13.0g20130807103413-win32.msi) and FTCOS/PK-01C card.

Currently the registers are not installed by MSI installer -- I had to install them manually using the link in your comment.

We could update MSI installer and create the registers for feitian card (as well as for the others: westcos, sc-hsm) during the product installation.

@viktorTarasov
Copy link
Member

in 12e0ac1 I added the feitian reg file to the distribution
(but not yet to MSI installer)

@viktorTarasov
Copy link
Member

Feitian registers are included to distribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants