签署 PyInstaller 可执行文件

Signing PyInstaller Executables

我尝试在 windows 上使用 signtool.exe,结合已弃用的 makecert.exe,但没有用,我还尝试了 PowerShell 替代方案以及 makercert.exe,这给了我无效的证书。 PowerShell 命令:

New-SelfSignedCertificate -DnsName [domain.com] -CertStoreLocation cert:\LocalMachine\My

当我尝试签署可执行文件时 bot.exe 我得到这个 warning/error:
“SignTool 错误:未找到满足所有给定条件的证书。” 是否可以免费为我的可执行文件生成 x509 证书?有付费的替代品吗?

不幸的是,正如@Crypt32 所述,使用 PowerShell 或 makecert.exe 无法获得公开信任的证书,我必须从公开信任的 CA 提供商那里获得证书。这篇 Microsoft 文章解释了该过程:Get a code signing certificate