2 # Create a p12 file from local certs
6 echo "Enter Keystore Name: "
12 # Add Cert AND Intermediate CAs (Clients will have Root CAs (or not))
13 cat certs/$MACH.crt > $MACH.chain
14 # Add THIS Intermediate CA into chain
15 cat certs/ca.crt >> $MACH.chain
17 # Make a pkcs12 keystore, a jks keystore and a pem keystore
19 # Note: Openssl will pickup and load all Certs in the Chain file
20 openssl pkcs12 -name $MACH -export -in $MACH.chain -inkey private/$MACH.key -out $MACH.p12