I am trying to dual sign a program with a Sectigo Code Signing certificate. It works but there is a problem. The commands are:
signtool.exe sign /t http://timestamp.sectigo.com /f "CertFile.pfx" /p "password" /v "MyProgram.exe"
signtool.exe sign /tr http://timestamp.sectigo.com?td=sha256 /td sha256 /fd sha256 /as /f "CertFile.pfx" /p "password" /v "MyProgram.exe"
So the first call uses CertFile.pfx and what is supposed to be SHA1 timestamp server and the second one uses what is supposed to be SHA256. The result is however SHA384 timestamp on both (the certificate is SHA1 + SHA384 timestamp, and the second one is SHA256 + SHA384 timestamp).
Now, I've tried to use different timestamp server:
http://timestamp.digicert.com
signtool.exe sign /t http://timestamp.digicert.com /f "CertFile.pfx" /p "password" /v "MyProgram.exe"
signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /f "CertFile.pfx" /p "password" /v "MyProgram.exe"
That gives me proper result SHA1 + SHA1 timestamp and SHA256 + SHA256 timestamp.
My question - can I combine the Digicert timestamp server with a Sectigo certificate to get a properly signed file, is there any drawback, and is there a way to force Sectigo timestamp server to use proper timestamp? It seems like a server misbehavior if it uses SHA384 when SHA256 is explicitly requested.