Permalink
Browse files

Sign the Windows driver and installer with the provided certificate.

  • Loading branch information...
shumatech committed May 14, 2017
1 parent 6361af1 commit 2123dc742ef8b115a54650a70d39b7d2a7dfe8ca
Showing with 37 additions and 11 deletions.
  1. +3 −0 .gitignore
  2. +28 −11 Makefile
  3. BIN install/bossa.cat
  4. +2 −0 install/bossa.inf
  5. +4 −0 install/bossa.wxs
  6. BIN install/license.rtf
@@ -7,3 +7,6 @@ bossac
bin
*.swp
tags
*.bak
install/*.crt
install/*.p12
@@ -40,21 +40,38 @@ COMMON_LDFLAGS=-Wl,--enable-auto-import -static -static-libstdc++ -static-libgcc
COMMON_LIBS=-ltermcap -Wl,--as-needed -lsetupapi
BOSSA_RC=BossaRes.rc
WIXDIR="C:\Program Files (x86)\WiX Toolset v3.10\bin"
CROSS_CA=$(INSTALLDIR)\\cross_ca.crt
CODE_SIGN=$(INSTALLDIR)\\code_sign.p12
TIMESTAMP=http://timestamp.comodoca.com/authenticode
SIGNTOOL="C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe"
INF2CAT="C:\Program Files (x86)\Windows Kits\10\bin\x86\Inf2Cat.exe"
define bossa_msi
$(OBJDIR)\\bossa-$(1)-$(VERSION).wixobj: $(INSTALLDIR)\\bossa.wxs
$(WIXDIR)\\candle.exe -dVersion=$(VERSION) -arch $(1) -out $$@ -ext $(WIXDIR)\\WixUIExtension.dll -ext $(WIXDIR)\\WixDifxAppExtension.dll $$<
$(BINDIR)\\bossa-$(1)-$(VERSION).msi: $(OBJDIR)\\bossa-$(1)-$(VERSION).wixobj
$(WIXDIR)\\light.exe -cultures:null -out $$@ -pdbout $(OBJDIR)\\bossa.wixpdb -sice:ICE57 -ext $(WIXDIR)\\WixUIExtension.dll -ext $(WIXDIR)\\WixDifxAppExtension.dll $(WIXDIR)\\difxapp_$(1).wixlib $$<
$$(Q)read -p "Password:" -rs PASSWORD; \
cmd /C '$(SIGNTOOL) sign /v /fd sha256 /ac $(CROSS_CA) /f $(CODE_SIGN) -t $(TIMESTAMP) /p '$$$$PASSWORD' $$@'
endef
$(OBJDIR)\\bossa-$(VERSION).wixobj: $(INSTALLDIR)\\bossa.wxs
$(WIXDIR)\\candle.exe -dVersion=$(VERSION) -arch x86 -out $@ -ext $(WIXDIR)\\WixUIExtension.dll -ext $(WIXDIR)\\WixDifxAppExtension.dll $<
$(OBJDIR)\\bossa64-$(VERSION).wixobj: $(INSTALLDIR)\\bossa.wxs
$(WIXDIR)\\candle.exe -dVersion=$(VERSION) -arch x64 -out $@ -ext $(WIXDIR)\\WixUIExtension.dll -ext $(WIXDIR)\\WixDifxAppExtension.dll $<
$(eval $(call bossa_msi,x86))
$(eval $(call bossa_msi,x64))
$(BINDIR)\\bossa-$(VERSION).msi: $(OBJDIR)\\bossa-$(VERSION).wixobj
$(WIXDIR)\\light.exe -cultures:null -out $@ -pdbout $(OBJDIR)\\bossa.wixpdb -sice:ICE57 -ext $(WIXDIR)\\WixUIExtension.dll -ext $(WIXDIR)\\WixDifxAppExtension.dll $(WIXDIR)\\difxapp_x86.wixlib $<
$(INSTALLDIR)\\bossa.cat: $(INSTALLDIR)\\bossa.inf
export TMP=$$(mktemp -d); \
cp $< $$TMP; \
cmd /C '$(INF2CAT) /v /driver:'$$(cygpath -w $$TMP)' /os:XP_X86,Vista_X86,Vista_X64,7_X86,7_X64,8_X86,8_X64,6_3_X86,6_3_X64,10_x86,10_x64'; \
mv $$TMP/bossa.cat $@; \
rm -rf $$TMP; \
read -p "Password:" -rs PASSWORD; \
cmd /C '$(SIGNTOOL) sign /v /fd sha256 /ac $(CROSS_CA) /f $(CODE_SIGN) -t $(TIMESTAMP) /p '$$PASSWORD' $@'
$(BINDIR)\\bossa64-$(VERSION).msi: $(OBJDIR)\\bossa64-$(VERSION).wixobj
$(WIXDIR)\\light.exe -cultures:null -out $@ -pdbout $(OBJDIR)\\bossa64.wixpdb -sice:ICE57 -ext $(WIXDIR)\\WixUIExtension.dll -ext $(WIXDIR)\\WixDifxAppExtension.dll $(WIXDIR)\\difxapp_x64.wixlib $<
bossa.cat: $(INSTALLDIR)\\bossa.cat
install32: $(BINDIR)\\bossa-$(VERSION).msi
install64: $(BINDIR)\\bossa64-$(VERSION).msi
install32: $(BINDIR)\\bossa-x86-$(VERSION).msi
install64: $(BINDIR)\\bossa-x64-$(VERSION).msi
.PHONY: install
install: strip install32 install64
BIN +8.61 KB install/bossa.cat
Binary file not shown.
@@ -4,6 +4,8 @@ Class=Ports ; This is a seri
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} ; Associated GUID
Provider=%SHUMATECH% ; Driver is provided by SHUMATECH
DriverVer=05/18/2011,1.0 ; Driver version
CatalogFile=bossa.cat ; Catalog file
DriverPackageDisplayName=%BOSSA% ; Driver display name
[DestinationDirs] ; DestinationDirs section
DefaultDestDir=12 ; Default install directory is \drivers or \IOSubSys
@@ -87,6 +87,10 @@
Name='bossa.inf'
DiskId='1'
Source='install\bossa.inf' />
<File Id='bossa.cat'
Name='bossa.cat'
DiskId='1'
Source='install\bossa.cat' />
<difx:Driver Legacy='yes'
ForceInstall='yes'
PlugAndPlayPrompt='no'
BIN -64 Bytes (97%) install/license.rtf
Binary file not shown.

0 comments on commit 2123dc7

Please sign in to comment.