有没有办法使用过期证书对二进制文件进行签名?
Is there a way to sign a binary file using an expired certificate?
我正在使用 signtool 来签署我的 exe 和 dll 文件。出于测试目的,我想找到使用过期证书的方法。可能吗?如果无法使用 signtool,我也可以使用其他工具。
顺便提一句。我不想更改我的系统日期,因为稍后我想尝试添加时间戳。
这是与 signTool 一起用于签署我的文件的命令和参数:
signTool sign /f expiredCert.pfx /p "pass" /v test.dll
结果我得到:
SignTool Error: No certificates were found that met all the given criteria.
我正在回答我自己的问题,因为事实证明最简单的方法是操纵系统时间。这对我来说很麻烦,因为它在我的开发机器上被阻止了,所以我不得不使用关闭时间同步的 virtualbox 机器来完成它。将系统时间更改为证书有效期内的日期后,我可以对文件进行签名。后来我什至能够使用外部服务添加时间戳。 Windows 当您查看文件属性中的“数字签名”选项卡时,当然会立即抱怨这个事实,但这是我想要实现的以执行测试。
正如您所指出的,可以签名,但要按照此处所述进行真正的签名(验证码)https://support.globalsign.com/code-signing/ev-code-signing-windows-7-and-8
Timestamping your Code is extremely important and is highly
recommended for every piece of code that you sign. This timestamp will
allow the file that you sign to remain valid long after the
certificate itself has expired.
您需要为其添加时间戳。我怀疑你是否被允许在时间戳证书的那一刻过期(恕我直言,它永远不会有效)。
P.S。你可以这样做 :( Nvidia 这样做了。正如我所说,它是无效的,但被 Windows 10 跳过,但被 virtualbox 识别为错误。
我正在使用 signtool 来签署我的 exe 和 dll 文件。出于测试目的,我想找到使用过期证书的方法。可能吗?如果无法使用 signtool,我也可以使用其他工具。 顺便提一句。我不想更改我的系统日期,因为稍后我想尝试添加时间戳。
这是与 signTool 一起用于签署我的文件的命令和参数:
signTool sign /f expiredCert.pfx /p "pass" /v test.dll
结果我得到:
SignTool Error: No certificates were found that met all the given criteria.
我正在回答我自己的问题,因为事实证明最简单的方法是操纵系统时间。这对我来说很麻烦,因为它在我的开发机器上被阻止了,所以我不得不使用关闭时间同步的 virtualbox 机器来完成它。将系统时间更改为证书有效期内的日期后,我可以对文件进行签名。后来我什至能够使用外部服务添加时间戳。 Windows 当您查看文件属性中的“数字签名”选项卡时,当然会立即抱怨这个事实,但这是我想要实现的以执行测试。
正如您所指出的,可以签名,但要按照此处所述进行真正的签名(验证码)https://support.globalsign.com/code-signing/ev-code-signing-windows-7-and-8
Timestamping your Code is extremely important and is highly recommended for every piece of code that you sign. This timestamp will allow the file that you sign to remain valid long after the certificate itself has expired.
您需要为其添加时间戳。我怀疑你是否被允许在时间戳证书的那一刻过期(恕我直言,它永远不会有效)。
P.S。你可以这样做 :( Nvidia 这样做了。正如我所说,它是无效的,但被 Windows 10 跳过,但被 virtualbox 识别为错误。