SDK工具的证书(makecert,pvk2pfx)

Via*_*hin 8 certificate pfx makecert

我需要制作两个证书:CA sert和Server证书.

我用这个命令.

makecert -r -pe -n "CN=CACert" -a sha1 -sky signature -cy authority -sv CACert.pvk CACert.cer

certutil -addstore Root TGCA.cer

makecert -pe -n "CN=ServerCert" -a sha1 -sky exchange -ic CACert.cer -iv CACert.pvk -sv ServerCert.pvk ServerCert.cer

pvk2pfx -pvk ServerCert.pvk -spc ServerCert.cer -pfx ServerCert.pfx
Run Code Online (Sandbox Code Playgroud)

然后我将ServerCert.pfx导入证书存储.

为什么他们不在存储中包含私钥?

bru*_*gna 14

为什么不尝试通过传递私钥密码作为参数来生成pfx文件?

试试这种方式

pvk2pfx -pvk ServerCert.pvk -spc ServerCert.cer -pfx ServerCert.pfx -pi password
Run Code Online (Sandbox Code Playgroud)

正如文件所说:

/ pi pvkpassword指定.pvk文件的密码.

来源:http://msdn.microsoft.com/en-us/library/windows/hardware/ff550672(v = vs.85).aspx