Dir*_* W. 6 windows signtool jenkins
在我们的构建服务器上使用signtool进行代码签名时,jenkins显示以下错误消息:
Done Adding Additional Store
Error information: "Error: SignerSign() failed." (-2147023673/0x800704c7)
SignTool Error: An unexpected internal error has occurred.
Run Code Online (Sandbox Code Playgroud)
我们在USB令牌上使用EV代码签名证书。所有工具都是实际可用的最新工具。
有任何想法吗?
使用相同的构建任务并在运行jenkins的同一台计算机(如下所述的用户)上手动运行它,以及在相同的环境/目录下根本不是问题。
Jenkins服务以具有管理员权限的简单用户身份(而不是本地系统)在Windows 10 pro VM上运行。
有关更多详细信息,请参阅Jenkins日志的以下摘录:
Signiere FlinkySchule.FormularEditor.exe:
Verbindung zu Token auf- bzw. abbauen
***** code signing *****
Aktueller Pfad des signtool:
c:\JW\FS\Production\Deployment\Tools\signtool\kits
Zu signierende Datei:
c:\JW\FS\Production\Application\Assemblies\FlinkySchule.FormularEditor\bin\Release\\FlinkySchule.FormularEditor.exe
The following certificate was selected:
Issued to: Dirk W.
Issued by: GlobalSign CodeSigning CA - SHA256 - G3
Expires: Fri Apr 03 15:58:51 2020
SHA1 hash: 4187Cxyxyxyxyxyxyxyxyxyxyx7978C4
Done Adding Additional Store
EXEC : error information: "Error: SignerSign() failed." (2147023673/0x800704c7) [c:\JW\FS\Production\Application\Assemblies\FlinkySchule.FormularEditor\FlinkySchule.FormularEditor.csproj]
EXEC : SignTool error : An unexpected internal error has occurred. [c:\JW\FS\Production\Application\Assemblies\FlinkySchule.FormularEditor\FlinkySchule.FormularEditor.csproj]
Run Code Online (Sandbox Code Playgroud)
一个问题是整个路径长度:即使在2017年,您也会遇到260个字符的路径长度限制。烦人!但是我们解决了这个问题,有时仍然会发生错误。
使用 eToken 与 Jenkins 进行 EV 协同设计
\n\n使用jsign找到了解决方案
\n\njava -jar jsign-2.0.jar --keystore .\\eToken.cfg --alias %yourCertAlias% --storetype PKCS11 --tsaurl http://rfc3161timestamp.globalsign.com/advanced --tsmode RFC3161 --storepass %tokenPassword% %file2sign%\nRun Code Online (Sandbox Code Playgroud)\n\neToken.cfg:
\n\nname=eToken\nlibrary=c:\\WINDOWS\\system32\\eTPKCS11.dll\nRun Code Online (Sandbox Code Playgroud)\n\n使用 java keytool 获取证书别名
\n\nkeytool -list -keystore NONE -storetype PKCS11 -providerclass sun.security.pkcs11.SunPKCS11 -providerArg eToken.cfg\nRun Code Online (Sandbox Code Playgroud)\n\n这应该输出类似的内容
\n\nKeystore-Typ: PKCS11\nKeystore-Provider: SunPKCS11-eToken\n\nKeystore enth\xc3\xa4lt 1 Eintrag\n\nte-318f471f-9a0e-4101-bf45-96a656cc2306, PrivateKeyEntry,\nZertifikat-Fingerprint (SHA1): \n41:87:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:X:XX:XX:XX:XX:79:78:C4\nRun Code Online (Sandbox Code Playgroud)\n\n也许商店里还有更多条目。要找到正确的,请查看您证书的指纹。jsign\ 的别名参数所需的别名是示例中以“te-318f4....”开头的字符串。
\n\n需要有关这部分的更详细帮助吗?请看看Trustzone。
\n\n如果您有兴趣了解我们如何仅使用一个 eToken USB 设备在单独的构建机器上执行自动构建过程,请告诉我。
\n