signtool-指定的PFX密码在新机器上不正确 [英] signtool - the specified PFX password is not correct from new machine

查看:412
本文介绍了signtool-指定的PFX密码在新机器上不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是代码签名的新手,我正在尝试创建一个尽可能安全的用于签名代码的过程.我通过从IE导出证书创建了一个.pfx文件,并为此创建了一个密码.我可以通过以下命令使用pfx文件对代码进行签名:

I'm new to code signing and I'm trying to create as secure a process for signing our code as possible. I created a .pfx file by exporting my certificate from IE and created a password for it. I'm able to sign code using the pfx file with the following command:

signtool.exe sign /f mypfx.pfx /p mypass myexetosign.exe

这工作正常,所以我复制了signtool.exe,pfx文件和其他可执行文件以签名到USB闪存驱动器.我将USB闪存驱动器带到第二台计算机,然后再次尝试了相同的命令,但是这次我得到SignTool Error: The specified PFX password is not correct.,我确定密码是正确的.我缺少将其移至另一台机器的额外步骤吗?我的最终目标是在离线静态环境中进行代码签名.

This works fine, so I copied signtool.exe, the pfx file, and a different executable to sign to a USB flash drive. I took the USB flash drive to a second computer and tried the same command again, but this time I get SignTool Error: The specified PFX password is not correct. I'm certain the password is correct. Is there an extra step I'm missing to move this to another machine? My ultimate goal is to do the code signing in an offline static environment.

推荐答案

我遇到的是,在导出过程中,pfx的加密为SHA256或3DES-SHA1.

What I've encountered is that during the export, the encryption of the pfx is SHA256 or 3DES-SHA1.

如果在其他计算机上导入,请确保使用相同的SDK,以便可以使用相同的加密来解密.

If importing on a different machine, make sure the same SDK is used, so the same encryption can be used to decrypt.

错误说明了这一点,如果您尝试使用错误的加密进行解密,则会产生垃圾,这也可能是密码错误造成的

The error explains this, if you try to decrypt with the wrong encryption, garbage comes out, which could be the result of a wrong password as well

相关的stackoverflow问题: 为什么我得到指定的PFX密码不正确".尝试使用signtool签名应用程序时?

Related stackoverflow question: Why I get "The specified PFX password is not correct" when trying to sign application with signtool?

这篇关于signtool-指定的PFX密码在新机器上不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆