Extract private key from pfx file or certificate store WITHOUT using OpenSSL on Windows

后端 未结 5 2362
孤街浪徒
孤街浪徒 2021-02-19 08:42

As the title suggests I would like to export my private key without using OpenSSL or any other third party tool. If I need a .cer file or .pfx file I c

5条回答
  •  孤街浪徒
    2021-02-19 09:26

    Try something like this:

    $mypwd = ConvertTo-SecureString -String "MyPassword" -Force -AsPlainText
    $mypfx = Get-PfxData -FilePath C:\Users\oscar\Desktop\localhost.pfx -Password $mypwd
    Export-PfxCertificate -PFXData $mypfx -FilePath C:\Users\oscar\Desktop\localhost.pfx -Password $NewPwd
    

提交回复
热议问题