2015-10-25 15:29:42 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-10-28 00:21:04 +02:00
|
|
|
set -e
|
|
|
|
|
2015-10-25 15:29:42 +01:00
|
|
|
PATH=$PATH:/opt/local/etc/openssl/misc
|
|
|
|
|
|
|
|
rm -rf demoCA
|
|
|
|
|
2016-10-28 00:21:04 +02:00
|
|
|
printf "\n\n ======== \x1b[33muse passphrase: \"test\" \x1b[0m=========\n\n"
|
|
|
|
printf "\n\n ======== \x1b[33muse common name: \"test\" \x1b[0m=========\n\n"
|
2015-10-25 15:29:42 +01:00
|
|
|
|
|
|
|
CA.sh -newca
|
|
|
|
|
|
|
|
cp ./demoCA/cacert.pem root_ca_cert.pem
|
|
|
|
cp ./demoCA/private/cakey.pem root_ca_private.pem
|
|
|
|
|
2016-10-28 00:21:04 +02:00
|
|
|
printf "\n\n ======== \x1b[33muse passphrase: \"test\" \x1b[0m=========\n\n"
|
|
|
|
printf "\n\n ======== \x1b[33muse common name: * \x1b[0m=========\n\n"
|
2015-10-25 15:29:42 +01:00
|
|
|
|
|
|
|
CA.sh -newreq
|
|
|
|
|
|
|
|
cp newkey.pem peer_private_key.pem
|
|
|
|
|
|
|
|
CA.sh -sign
|
|
|
|
|
|
|
|
cp newcert.pem peer_certificate.pem
|
|
|
|
|
|
|
|
openssl dhparam -outform PEM -out dhparams.pem 2048
|
|
|
|
|