dantpro icon

crt-extract-from-pfx.cmd

dantpro | PRO | 04/06/15 05:17:26 AM UTC | 0 ⭐ | 588 👁️ | Never ⏰ | []
Batch |

300 B

|

None

|

0 👍

/

0 👎

@echo off
:: Extracting Certificate and Private Key Files from a .pfx File
 
Set PFXFileName=mycert
 
openssl pkcs12 -in %PFXFileName%.pfx -nocerts -out %PFXFileName%.pem -nodes
openssl pkcs12 -in %PFXFileName%.pfx  -nokeys -out %PFXFileName%.crt
openssl rsa -in %PFXFileName%.pem -out %PFXFileName%.key

Comments