VSTO Excel 加载项在用于签名的证书到期日期后不起作用

问题描述

我在我的 WPF 项目中使用 VSTO。 我正在使用 pfx 文件签署我的 exe、addin dll、msi、安装程序,该文件在 2021 年 6 月 23 日到期。我正在使用 digicert 进行时间戳。但证书插件到期后不起作用。

我通过以下方法检查: 当我在证书到期后更改系统时钟时,插件未加载。 但是如果我加了时间戳,它必须正常工作。

我从下面的链接尝试过,但对我不起作用: https://social.msdn.microsoft.com/Forums/vstudio/en-US/fc16e9bf-8628-4abf-95e9-d1e38633730d/vsto-3-addin-not-using-timestamp-on-expired-certificate?forum=vsto

我尝试了以下方法,但也没有用。 方法一:

signtool sign /f mycertpfx.pfx /p passwd /tr http://timestamp.digicert.com/?alg=sha256 /td sha256 /fd sha256 /d "myexe.exe"

方法二:

signtool sign /t http://timestamp.digicert.com /f "mycertpfx.pfx" /p passwdr "myexe.exe"
signtool sign /t http://timestamp.digicert.com /f "mycertpfx.pfx" /p passwdr "myaddin.dll"
signtool sign /t http://timestamp.digicert.com /f "mycertpfx.pfx" /p passwdr "mymsi.msi"
signtool sign /t http://timestamp.digicert.com /f "mycertpfx.pfx" /p passwdr "myinstaller.exe"

方法 3:

signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /f  "mycertpfx.pfx" /p passwdr "myexe.exe"
signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /f  "mycertpfx.pfx" /p passwdr "myaddin.dll"
signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /f  "mycertpfx.pfx" /p passwdr "mymsi.msi"
signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /f  "mycertpfx.pfx" /p passwdr "myinstaller.exe"

需要解决上述问题。

还需要一种方法来检查一次点击(excel添加vsto)是否有效,即使在证书到期后也是如此。(如系统时钟更改)

IDE:Visual Studio 2017

Screenshot attached about the error showing after expiry date

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)