The build script used to sign every exe in one step (and we have several as part of our product), and now it does one-by-one - takes slightly longer, but is less likely to fail
So after some unusefull research on internet I tried to put http://*.verisign.com in trusted zone sites and it works...
最后,我不知道是否服务器有问题,现在工作或如果我做了正确的事情,将在未来几天看到我认为。
希望对其他被封锁的人有所帮助。
我使用下面的批处理文件,最多循环300次。有两个参数,% 1是包含批处理文件、 pfx 文件和 signtool.exe 的文件夹的路径。% 2是正在签名的文件的完整路径。您可以在您的可视化工作室的 post build 事件中使用类似于调用“ $(SolutionDir)第三方签名 sign.bat”“ $(SolutionDir)第三方签名”“ $(TargetPath)”这样的命令来调用它
I have modified this batch file to use different timestamp servers in each iteration. Currently it uses Comodo, Verisign, GlobalSign and Starfield. Hopefully this is The Ultimate Signing Script ;)
@echo off
REM create an array of timestamp servers...
set SERVERLIST=(http://timestamp.comodoca.com/authenticode http://timestamp.verisign.com/scripts/timestamp.dll http://timestamp.globalsign.com/scripts/timestamp.dll http://tsa.starfieldtech.com)
REM sign the file...
%1\signtool.exe sign /f %1\comodo.pfx /p videodigital %2
set timestampErrors=0
for /L %%a in (1,1,300) do (
for %%s in %SERVERLIST% do (
REM try to timestamp the file. This operation is unreliable and may need to be repeated...
%1\signtool.exe timestamp /t %%s %2
REM check the return value of the timestamping operation and retry a max of ten times...
if ERRORLEVEL 0 if not ERRORLEVEL 1 GOTO succeeded
echo Signing failed. Probably cannot find the timestamp server at %%s
set /a timestampErrors+=1
)
REM wait 2 seconds...
choice /N /T:2 /D:Y >NUL
)
REM return an error code...
echo sign.bat exit code is 1. There were %timestampErrors% timestamping errors.
exit /b 1
:succeeded
REM return a successful code...
echo sign.bat exit code is 0. There were %timestampErrors% timestamping errors.
exit /b 0