遇到问题
解决方法
购买正式证书,如Global Sign,他们会提供签名工具
自签名证书,可使用微软的签名工具
https://docs.microsoft.com/zh-cn/dotnet/framework/tools/signtool-exe
步骤
1、安装vs2019,并打开developer powershell for vs 2019
2、执行如下命令
D:\signtoodemo>Makecert -sv test.pvk -r -n "CN=TCT" test.cer
Succeeded
D:\signtoodemo>Cert2spc test.cer test.spc
Succeeded
D:\signtoodemo>pvk2pfx -pvk test.pvk -spc test.spc -pfx test.pfx -f
D:\signtoodemo>signtool sign /fd SHA256 /f test.pfx demo.exe
Done Adding Additional Store
Successfully signed: demo.exe
D:\signtoodemo> signtool sign /f test.pfx /t http://timestamp.digice