Windows certificates

From UVOO Tech Wiki
Jump to navigation Jump to search
Get-ChildItem -path cert:\LocalMachine\My
$mypwd = ConvertTo-SecureString -String '1234' -Force -AsPlainText
Get-ChildItem -Path Cert:\LocalMachine\My\157FC435B37B574C7CB4E030BE29FDB4E63C24A9 | Export-PfxCertificate -FilePath busktest225.pfx -Password $mypwd
bash
export PASSIN=1234
openssl pkcs12 -passin env:PASSIN -in foo1.pfx -nocerts -nodes > foo1.key.pem
cat footest225.key.pem


PS> Get-ChildItem -Path Cert:\LocalMachine\My\EC1483E46D3E0AE4FB94820A72ADBDE2E934B0F4 | Export-PfxCertificate -FilePath foo2.pfx -Password $mypwd
Export-PfxCertificate: Cannot export non-exportable private key.

https://stackoverflow.com/questions/3914882/how-to-export-non-exportable-private-key-from-store#:~:text=Open%20the%20non%2Dexportable%20cert,certificate%20including%20the%20private%20key.

https://pei.com/exporting-certificate-not-exportable/