pfx 证书导入期间密码错误 Windows(10, 2016)

Ice*_*ced 7 windows powershell ssl-certificate

我尝试导入 *.pfx 证书,但收到有关“密码错误”的错误消息。该错误仅出现在某些系统上。

我已经在几台 Windows 10 计算机和一台 Windows Server 2016 上对此进行了测试。

  • Windows 10(不起作用):构建 10.0.16299.0
  • Windows 10(不起作用):构建 10.0.14393.0
  • Windows 10(有效):构建 10.0.17134.0
  • Windows Server 2016(无效)。

我还尝试使用 Powershell 导入证书(使用下面的 cmdlet),也导致相同的错误:

$mypwd = ConvertTo-SecureString -String "some-password" -Force –AsPlainText
Import-PfxCertificate –FilePath C:\tmp\Client.pfx cert:\localMachine\my -Password $mypwd
Run Code Online (Sandbox Code Playgroud)

Import-PfxCertificate :您尝试导入的 PFX 文件需要不同的密码或它受保护的 Active Directory 主体的成员身份。

小智 7

错误信息不正确。问题是 Win10 <= 1703 不支持导入 SHA256 加密的 pfx 证书。

https://github.com/PowerShell/CertificateDsc/issues/153