I have read that to create a .PFX file in Windows I have to use this commandline:
pvk2pfx.exe -pvk MyKey.pvk -spc MyKey.cer -pfx MyPFX.pfx
So I started cmd as Administrator and typed this commandline:
"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\pvk2pfx.exe " -pvk R:\key\mykey.key -spc R:\mycert.crt -pfx R:\MyPFX.pfx ERROR: Bad file format. (Error Code = 0x8007000b).
mykey.key is a text file with this content:
-----BEGIN RSA PRIVATE KEY----- MIIEpwIBAAKCAQEAoM98qgIc9LrFDYyzdOb24EZL89QVq0XFiPVVD88qcxcqfqEE
[lines in between omitted for privacy reasons] hLHvj4JisIWkE60CsbQpxZ+LtUL9Nw//DaeiSr4rGkKBwu034b4bLl0PbQ==
-----END RSA PRIVATE KEY-----
mycert.crt is also a text file with this content:
-----BEGIN CERTIFICATE----- MIID0jCCArqgAwIBAgIMIhKlAG2UZQBuMQwAMA0GCSqGSIb3DQEBCwUAMHIxCzAJ
[lines in between omitted for privacy reasons]
I was also prompted for a password.
Windows 7 x64 SP1
So why does pvk2pfx.exe say "bad file format" and how can I create the pfx file from these two files?
User contributions licensed under CC BY-SA 3.0