Merge pull request #3 from m31271n/master

ISRG Root X1 is not yet trusted in most browsers, so use replace it with X3
This commit is contained in:
Denny Dai 2016-03-30 03:14:08 -05:00
commit 2a11a48827

View File

@ -1,15 +1,14 @@
#!/bin/bash #!/bin/bash
path=$(pwd) path=$( cd "$(dirname "$BASH_SOURCE[0]")" ;pwd -P )
echo -n "Your Domain:" echo -n "Your Domain:"
read domain read domain
docker-compose up -d docker-compose up -d
openssl genrsa 4096 > $path/certs/$domain.key openssl genrsa 4096 > $path/certs/$domain.key
openssl req -new -sha256 -key $path/certs/$domain.key -subj "/CN=$domain" > $path/certs/$domain.csr openssl req -new -sha256 -key $path/certs/$domain.key -subj "/CN=$domain" > $path/certs/$domain.csr
python $path/acme_tiny.py --account-key account.key --csr $path/certs/$domain.csr --acme-dir $path/www/ > $path/certs/pre.$domain.crt python $path/acme_tiny.py --account-key account.key --csr $path/certs/$domain.csr --acme-dir $path/www/ > $path/certs/pre.$domain.crt
wget -O - https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem > $path/certs/letsencrypt-intermediate.pem wget -O - https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem > $path/certs/letsencrypt-intermediate.pem
cat $path/certs/pre.$domain.crt $path/certs/letsencrypt-intermediate.pem > $path/certs/$domain.crt cat $path/certs/pre.$domain.crt $path/certs/letsencrypt-intermediate.pem > $path/certs/$domain.crt
rm $path/certs/letsencrypt-intermediate.pem rm $path/certs/letsencrypt-intermediate.pem
rm $path/certs/pre.$domain.crt rm $path/certs/pre.$domain.crt
rm $path/certs/$domain.csr rm $path/certs/$domain.csr
docker-compose stop docker-compose down
docker-compose rm -f