Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nanqinlang-script/acme
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.6
Choose a base ref
...
head repository: nanqinlang-script/acme
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 7 commits
  • 4 files changed
  • 2 contributors

Commits on Dec 13, 2017

  1. update readme

    NewBugger authored Dec 13, 2017
    Copy the full SHA
    77f756f View commit details

Commits on Dec 27, 2017

  1. Update README.md

    NewBugger authored Dec 27, 2017
    Copy the full SHA
    2e0c654 View commit details

Commits on Jan 2, 2018

  1. root certificate

    NewBugger authored Jan 2, 2018
    Copy the full SHA
    60cd808 View commit details

Commits on Mar 14, 2018

  1. make

    NewBugger authored Mar 14, 2018
    Copy the full SHA
    47bc021 View commit details
  2. Add files via upload

    NewBugger authored Mar 14, 2018
    Copy the full SHA
    3d1562f View commit details

Commits on Jun 16, 2018

  1. Update README.md

    nanqinlang authored Jun 16, 2018
    Copy the full SHA
    5d963ed View commit details
  2. Update README.md

    nanqinlang authored Jun 16, 2018
    Copy the full SHA
    8774445 View commit details
Showing with 809 additions and 361 deletions.
  1. +20 −0 DST_Root_CA_X3.pem
  2. +5 −5 README.md
  3. +77 −0 acme_2.0.sh
  4. +707 −356 make.sh
20 changes: 20 additions & 0 deletions DST_Root_CA_X3.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,19 +4,19 @@
[![author](https://github.com/nanqinlang/SVG/blob/master/author-nanqinlang-lightgrey.svg)](https://github.com/nanqinlang-script/acme)
[![license](https://github.com/nanqinlang/SVG/blob/master/license-GPLv3-orange.svg)](https://github.com/nanqinlang-script/acme)

SSL certification files production script
`SSL Certificates` creater script

based on [acme.sh](https://github.com/Neilpang/acme.sh)

## usage
```bash
wget https://github.com/nanqinlang-script/acme/releases/download/1.5/acme_1.5.sh
bash acme_1.5.sh
wget https://github.com/nanqinlang-script/acme/releases/download/1.6/acme_1.6.sh
bash acme_1.6.sh
```

## according
Releases
Releases History
https://github.com/nanqinlang/acme/releases

中文文档
https://www.nanqinlang.com/shell-acme.html
https://github.com/nanqinlang-script/acme/wiki
77 changes: 77 additions & 0 deletions acme_2.0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/bash
Green_font="\033[32m" && Red_font="\033[31m" && Font_suffix="\033[0m"
Info="${Green_font}[Info]${Font_suffix}"
Error="${Red_font}[Error]${Font_suffix}"
echo -e "${Green_font}
#===========================================
# Project: acme - SSL Certificates generator
# Version: 2.0
# Author: nanqinlang
# Blog: https://sometimesnaive.org
# Github: https://github.com/nanqinlang
#===========================================${Font_suffix}"

check_root(){
[[ "`id -u`" != "0" ]] && echo -e "${Error} must be root user !" && exit 1
}

directory(){
[[ ! -d /home/acme ]] && mkdir -p /home/acme
cd /home/acme
}

get_makesh(){
[[ ! -f make.sh ]] && wget https://raw.githubusercontent.com/nanqinlang-script/acme/master/make.sh && chmod +x make.sh
[[ ! -f make.sh ]] && echo -e "${Error} requirement download failed, please check !" && exit 1
}

get_domain(){
echo -e "${Info} input your domain:"
read -p "(defaultly cancel):" domain
[[ -z "${domain}" ]] && echo -e "${Error} no input domain, exiting..." && exit 1
}

create(){
echo -e "${Info} select required type:\n1.rsa\n2.ecc"
read -p "(defaultly choose rsa):" type
if [[ -z "${type}" ]]; then
./make.sh --issue --dns -d ${domain}
elif [[ "${type}" = "1" ]]; then
./make.sh --issue --dns -d ${domain}
elif [[ "${type}" = "2" ]]; then
./make.sh --issue --dns -d ${domain} --keylength ec-256
else
echo -e "${Error} invalid input, exiting" && exit 1
fi

echo -e "${Info} now you should perform domain TXT record authorization"
read -p "then press 'enter' to continue"
if [[ "${type}" = "1" ]]; then
./make.sh --renew -d ${domain} && mv -f /root/.acme.sh/${domain} /home/${domain}_rsa
else ./make.sh --renew -d ${domain} --ecc && mv -f /root/.acme.sh/${domain}_ecc /home/${domain}_ecc
fi
}

exist(){
if [[ "${type}" = "1" ]]; then
if [[ -d /home/${domain}_rsa ]]; then
echo -e "${Info} SSL certificate files are in /home/${domain}_rsa "
else echo -e "${Error} failed, please check !"
fi
else
if [[ -d /home/${domain}_ecc ]]; then
echo -e "${Info} SSL certificate files are in /home/${domain}_ecc "
else echo -e "${Error} failed, please check !"
fi
fi
}


check_root
directory
get_makesh
get_domain
create
exist
rm -rf /root/.acme.sh
rm -rf /home/acme
Loading