gpt4 book ai didi

windows - 非管理员用户的 SignTool 证书位置

转载 作者:可可西里 更新时间:2023-11-01 10:43:12 26 4
gpt4 key购买 nike

我正在尝试使用 SignTool.exe 对安装在 Windows 证书存储中的证书的可执行文件进行代码签名。我可以通过将证书安装到 Local Machine/Personal 部分然后以管理员身份运行来让它工作,但我似乎无法找出证书需要的正确位置安装后以当前用户身份运行。

我已将证书安装到 Current User/Personal 中,当我这样做时:

Get-ChildItem -Path Cert:\CurrentUser\My

证书在列表中。但是当我尝试签名时:

& "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" 
sign /v /n "West Wind Technologies"
/s MY
/tr "http://timestamp.digicert.com" /td SHA256 /fd SHA256
".\Builds\CurrentRelease\MarkdownMonsterSetup.exe"

以非管理员用户身份运行它不起作用。我得到:

SignTool Error: No certificates were found that met all the given criteria.

如果我添加 /sm 标志并以管理员身份运行并且将它放在个人商店中 - 它可以工作。

我必须将证书放在证书存储区的什么位置才能使其在没有管理员权限的情况下运行?

最佳答案

对于当前用户,您可以使用 Certmgr 将其导入个人文件夹。我使用 signtool/n 选项。

当您在自动化环境中使用 signtool 时有点困难,因为(如果您的安全设置正确)构建代理在受限服务帐户下运行。一种选择是使用文件。

关于windows - 非管理员用户的 SignTool 证书位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39885634/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com