41 lines
1.2 KiB
Batchfile
41 lines
1.2 KiB
Batchfile
@echo off
|
|
setlocal EnableDelayedExpansion
|
|
|
|
set "ProductName=C4IT Light Identity Access Management"
|
|
set "SignTool=..\..\Common Code\Tools\signtool.exe"
|
|
set "TimeStamp=http://rfc3161timestamp.globalsign.com/advanced"
|
|
set "SignCertificateSubject=Consulting4IT GmbH"
|
|
set "SignCertificateEmail=info@consulting4it.de"
|
|
|
|
if defined LIAM_SIGN_CERT_SUBJECT (
|
|
set "SignCertificateSubject=%LIAM_SIGN_CERT_SUBJECT%"
|
|
)
|
|
|
|
set "FileList="
|
|
|
|
if exist ".\bin\Release\LiamWorkflowDiagnostics.exe" (
|
|
set "FileList=!FileList! ".\bin\Release\LiamWorkflowDiagnostics.exe""
|
|
)
|
|
|
|
for %%F in (".\bin\Release\Liam*.dll") do (
|
|
if exist "%%~fF" (
|
|
set "FileList=!FileList! "%%F""
|
|
)
|
|
)
|
|
|
|
if not defined FileList (
|
|
echo No matching release binaries found to sign.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Signing all matching files at once...
|
|
echo Expected signer: %SignCertificateSubject% ^<%SignCertificateEmail%^>
|
|
if defined LIAM_SIGN_CERT_THUMBPRINT (
|
|
call "%SignTool%" sign /sha1 "%LIAM_SIGN_CERT_THUMBPRINT%" /tr %TimeStamp% /td SHA256 /fd SHA256 /d "%ProductName%" !FileList!
|
|
) else (
|
|
call "%SignTool%" sign /n "%SignCertificateSubject%" /tr %TimeStamp% /td SHA256 /fd SHA256 /d "%ProductName%" !FileList!
|
|
)
|
|
|
|
pause
|