[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Generate PKCS12 file from .cer and .pvk

Posted on 2014-01-20
6
Medium Priority
?
2,472 Views
Last Modified: 2014-01-20
Hi Experts,

How can I generate a pfx file from a .cer and .pvk file?

Thanks,
Mike
0
Comment
Question by:thready
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:amatson78
ID: 39794406
You can use openssl:

# openssl pkcs12 -export -out certificate.pfx -inkey certificate.key -in certificate.crt

If you need to include the certificate chain you can add "-certfile CACert.crt"

# openssl pkcs12 -export -out certificate.pfx -inkey certificate.key -in certificate.crt -certfile CACert.crt

You will be prompted to create a password twice and then cert should be created. You can check the cert with:

#openssl pkcs12 -info -in certificate.pfx
0
 
LVL 1

Author Comment

by:thready
ID: 39794442
My key is in the Microsoft proprietary blob format (.PVK) - not any of the formats required by OpenSSL...
0
 
LVL 8

Accepted Solution

by:
amatson78 earned 1600 total points
ID: 39794522
My apoligies I missed that part. I should have read better. Since you have the .pvk already that part should be good. First convert the .cer to a .spc with Cert2spc.exe (http://msdn.microsoft.com/en-us/library/f657tk8f(v=vs.110).aspx):

cert2Spc.exe certificate.cer certificate.spc

Open in new window


Then once that is done use pvk2pfx (http://msdn.microsoft.com/en-us/library/windows/hardware/ff550672(v=vs.85).aspx) to merge the .spc and the .pvk to a .pfx file:

pvk2pfx.exe -pvk yourkey.pvk -pi <password> -spc certificate.spc -pfx certificate.pfx -po <password>

Open in new window


See if that works for you.

Cheers, Alan
0
Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

 
LVL 33

Assisted Solution

by:Dave Howe
Dave Howe earned 400 total points
ID: 39794527
you can download a conversion tool to standard PEM format here:

http://www.drh-consultancy.demon.co.uk/pvk.html

once it is in PEM format, you can use openssl or any other suitable tool (I prefer XCA) to convert that and the CER into the #12 format.
0
 
LVL 1

Author Closing Comment

by:thready
ID: 39794578
Thank you!
0
 
LVL 8

Expert Comment

by:amatson78
ID: 39795678
Glad that it helped and thank you for the Awesome rating :)

Cheers, Alan
0

Featured Post

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A bad practice commonly found during an account life cycle is to set its password to an initial, insecure password. The Password Reset Tool was developed to make the password reset process easier and more secure.
With the evolution of technology, we have finally reached a point where it is possible to have home automation features like having your thermostat turn up and door lock itself when you leave, as well as a complete home security system. This is a st…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question