added more tunnels.
[feisty_meow.git] / scripts / security / create_certificates.sh
1
2 filename="$1"; shift
3 if [ -z "$filename" ]; then
4   echo This script needs a base portion for the certificate filename to create.
5   echo For example:
6   echo   $0 DrakeKey
7   echo would create DrakeKey.pem and DrakeKey.pfx.
8   exit 1
9 fi
10
11 # create PEM file.
12 openssl req -x509 -nodes -days 3650 \
13   -newkey rsa:1024 -keyout ${filename}.pem -out ${filename}.pem
14
15 # export PFX file.
16 openssl pkcs12 -export -out ${filename}.pfx -in ${filename}.pem -name "Drake Container Certificate"
17
18 # export the PFX to a certificate file.  this can be given to other folks.
19 openssl x509 -inform pem -in ${filename}.pem -outform der -out ${filename}.cer
20
21
22