Advertisement
dantpro

crt-extract-from-pfx.cmd

Apr 6th, 2015
315
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. :: Extracting Certificate and Private Key Files from a .pfx File
  3.  
  4. Set PFXFileName=mycert
  5.  
  6. openssl pkcs12 -in %PFXFileName%.pfx -nocerts -out %PFXFileName%.pem -nodes
  7. openssl pkcs12 -in %PFXFileName%.pfx  -nokeys -out %PFXFileName%.crt
  8. openssl rsa -in %PFXFileName%.pem -out %PFXFileName%.key
Advertisement
RAW Paste Data Copied
Advertisement