I use signtool to indicate the sign of some Windows installation files and application executables. The command I use:
signtool sign /f "\path\to\certfile.pfx" /p "certPassword" /tr http://tsa.starfieldtech.com /td SHA256 "path\to\setup.exe"
The /tr causes the signature to have a timestamp with the specified timestamp server. /td indicates the digest algorithm (hash function).
This command is usually executed by automatically setting the code signing on one of our remote servers. The task contains 22 different executable files, half of which are installation files, and the other half are executable programs of the application. Often at some point in the task of signing the command fails in one of the files. It is not always one or the other type of exe, it occurs on both types. Mistake:
Done Adding Additional Store Error information: "SignerTimeStampEx2() failed." (-2146881278/0x80093102) SignTool Error: An unexpected internal error has occurred. Sign command failed with exit code 1.
The MSDN documentation states that code 0x80093102 means:
CRYPT_E_ASN1_EOD - ASN1 unexpected end of data.
I checked the Windows Event Log server and did not find any related messages.
I restart the task and it sometimes fails on another exe and sometimes it successfully signs all the files. Note that the job does not rebuild the exe, it uses the same exe source every time. I did the same job locally many times with the same executables and never had a problem. It seems that only when I run from a remote server. Based on this fact, the registered error information and the text explaining the result code, it seems that he is either having problems connecting to the server timestamps, or with an error message with the server.
What exactly does this error mean and how to solve the problem?
Update: I changed my signing script to repeat signing a separate exe up to five times when it does not work on this EXE. When testing this change on my local computer, I actually ran into an instance of the same error, which indicates that this is not just a problem on the remote server. Assuming this is simply an inability to contact the timestamp server, this might be my best option. However, I would still like to know what the exact cause of the error is.
certificate code-signing signtool
Ron ratzlaff
source share