Advertisement
dantpro

crt-extract-from-pfx.cmd

Apr 6th, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.30 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement