premiere-libtorrent/test/ssl/regenerate_test_certificate.sh

32 lines
673 B
Bash
Raw Permalink Normal View History

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