컴퓨터

PFX파일을 SPC와 PVK로 변환하기

Subi Lee 2010. 1. 19.
반응형
 Converting a PFX file to SPC and PVK files
Solution

How to convert your .PFX (p12) certificate to a .pvk + .spc combination on Windows.



Use the export wizard with the following options:
- Export Private Key
- DO NOT TICK "include all certificates in the certification path if possible"
- TICK "enable strong protection"
- DO NOT TICK "delete private key"

Prerequisite: OpenSSL

Note: If you are running Windows you may download OpenSSL here. Otherwise, you can find compiled binaries directly from the OpenSSL Website or consult your Operating System's package management feature.

1) Extract your private key from the pfx file.
->openssl pkcs12 -in (pfx-file) -nocerts -nodes -out (pem-key-file)
Example: ->openssl pkcs12 -in SOMETHING.pfx -nocerts -nodes -out SOMETHING.PEM

The PFX password will be asked.

2) Download the PVK transform utility. This file can be found here.
-> pvk -in(pem-key-file) -topvk -out (pvk-file)
Example: -> pvk -in SOMETHING.PEM -topvk -out SOMETHING.pvk

3) Extract your certificates from the PFX file.
-> openssl pkcs12 -in (pfx-file) -nokeys -out (pem-certs-file) 
Example: -> openssl pkcs12 -in SOMETHING.pfx -nokeys -out SOMETHING_CERTS.pem

The PFX password will be asked.

4) Transform your PEM file to a SPC file
-> openssl crl2pkcs7 -nocrl -certfile (pem-certs-file) -outform DER -out (spc-file)
Example: -> openssl crl2pkcs7 -nocrl -certfile SOMETHING_CERTS.pem -outform DER -out SOMETHING.SPC

Currently this is the only way to split a PFX to SPC and PVK files. With OpenSSL 0.9.9 (release unknown at this time), this process should become a little bit easier. If this process does not work with you please contact Technical Support.

Note: At this time we can not attach the SPC and PVK files to an e-mail to you due to the fact that the private key would no longer be private. We do apologize for the inconvenience.



출처:  https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1089

반응형

댓글