blob: ea4aab5b34b72cf4256160fc589050d42483157d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|