Authenticode를위한 대체 타임 스탬프 서비스
우리는 모든 프로덕션 빌드에 대해 코드 서명 및 타임 스탬프를 수행합니다. 때때로 (보통 우리가 RTM (!)을 시도 할 때) Verisign의 타임 스탬프 서버 ( " http://timestamp.verisign.com/scripts/timstamp.dll ")가 간헐적으로 오프라인으로 전환하기로 결정합니다.
이 경우 어떻게해야합니까?
- 타임 스탬프 서버는 루트 인증 기관에서 호스팅해야합니까?
- 서버가 다운 된 경우 Verisign 대신 사용할 수있는 다른 네트워크 호스팅 타임 스탬프 서버가 있습니까? 다른 고 가용성 및 무료 대안에 대한 제안을 환영합니다. :)
최대 300 회 반복되는 다음 배치 파일을 사용합니다. 두 개의 인수가 있습니다. % 1은 배치 파일, pfx 파일 및 signtool.exe를 포함하는 폴더의 경로입니다. % 2는 서명중인 파일의 전체 경로입니다. Visual Studio 빌드 후 이벤트에서 "$ (SolutionDir) thirdparty \ signing \ sign.bat" "$ (SolutionDir) thirdparty \ signing" "$ (TargetPath)"와 같이 호출 할 수 있습니다.이 배치 파일을 다음과 같이 수정했습니다. 각 반복에서 다른 타임 스탬프 서버를 사용합니다. 현재 Comodo, Verisign, GlobalSign 및 Starfield를 사용합니다. 바라건대 이것은 궁극적 인 서명 스크립트입니다;)
@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
또한 http://timestamp.comodoca.com 을 신뢰할 수있는 사이트에 넣었습니다 (Vince에게 감사드립니다). 중요한 단계라고 생각합니다. PC에서도 루트 인증서를 업데이트했습니다.
타임 스탬프 서버를 루트 CA가 소유해야하는지 확실하지 않습니다.
우리는 http://timestamp.comodoca.com/authenticode (그리고 Comodo 인증 인증서가 있음)를 사용하지만 실제로는 서버에서 오류가 발생하거나 가끔 시간 초과되는 것처럼 보이는 유사한 문제가 있습니다. 우리는 릴리스 빌드 전용 (디버그 빌드 용이 아님)을 위해 지속적 통합 서버에서 야간 (또는 주문형) 빌드의 일부로 서명합니다.
나는 이것을 (대부분) 두 가지 방법으로 해결했습니다.
- signtool.exe에 대한 호출이 실패하면 두 번 더 (즉시) 다시 시도합니다.
- 한 단계로 모든 exe에 서명하는 데 사용되는 빌드 스크립트 (제품의 일부로 여러 개가 있음), 이제 하나씩 수행합니다. 약간 더 오래 걸리지 만 실패 할 가능성은 적습니다.
Between these, build failures caused by timestamp server issues have gone from once or twice a week thing to virtually never.
EDIT: I have an MSBuild task that does this (as well as reads a certificate password stored outside the repository) at https://gist.github.com/gregmac/4cfacea5aaf702365724
It works nicely by replacing the verisign timestamp url by one of these:
http://timestamp.comodoca.com/authenticode
http://www.trustcenter.de/codesigning/timestamp
Any timestamp server can be used: I recently switched from my issuer's timestamp server to Verisign since I found that GlobalSign's server was unreliable. Furthermore, Thawte don't run their own timestamp server but recommend people to use Verisign's.
The VeriSign timestamping service is free of charge. That may be perhaps why it's reliability is less than adequate; they don't give it a maintenance a budget!
Definitely this is a big problem. Wasted time due to failed builds from code timestamping failures is a growing issue throughout the software development industry. Sure, you can write a complex script to rotate through, until you find a working time stamping server.. but, really?
We should demand better. We pay A LOT for these certificates.
Note that I later found alternate time-stamp servers that few have heard of were fine to use in periods where Verisign and Comodo is down (usually happens during working hours on workdays).
I had the same problem. verisign server wasn't reachable sometime for some files I tried to sign (but other files in the same build was correctly signed).
I usually retry and it works but today, no way.
So after some unusefull research on internet I tried to put http://*.verisign.com in trusted zone sites and it works... Finally I don't know if the server had a problem and now works or if I did the right thing, will see in next days I think. Hope it may helps other which are blocked.
The server config: Windows server 2003 sp2, IE8, enhanced security on.
참고URL : https://stackoverflow.com/questions/2872105/alternative-timestamping-services-for-authenticode
'Programing' 카테고리의 다른 글
Blob을 base64로 변환 (0) | 2020.08.16 |
---|---|
오이 단계 재사용 (0) | 2020.08.16 |
CDN이 실패 할 경우 로컬 스타일 시트 (스크립트 아님)로 대체하는 방법 (0) | 2020.08.14 |
Express 4.0, 이상한 경고 메시지가있는 익스프레스 세션 (0) | 2020.08.14 |
JavaScript로 CSS 규칙 값을 어떻게 읽습니까? (0) | 2020.08.14 |