Added convert.sh
This commit is contained in:
parent
b2a0e9b6c8
commit
c62e494bb1
21
convert.sh
Normal file
21
convert.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Please insert full path to the pfx file!"
|
||||
|
||||
read certpath
|
||||
|
||||
echo "Please insert new name off cert! (e.g. srv-01)!"
|
||||
|
||||
read certname
|
||||
|
||||
#Extract the certificate from the pfx file
|
||||
|
||||
openssl pkcs12 -in $certpath -clcerts -nokeys -out $certname.crt
|
||||
|
||||
#Extract private key from the pfx file
|
||||
|
||||
openssl pkcs12 -in $certpath -nocerts -nodes -out $certname.key
|
||||
|
||||
#Extract chain from the pfx file
|
||||
|
||||
openssl pkcs12 -in $certpath -out $certname.chain.crt -nodes -nokeys -cacerts
|
Loading…
Reference in New Issue
Block a user