mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-30 18:07:15 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/Neilpang/acme.sh
This commit is contained in:
		
						commit
						432c589722
					
				| @ -31,6 +31,7 @@ Wiki: https://github.com/Neilpang/acme.sh/wiki | ||||
| |13|[](https://github.com/Neilpang/letest#here-are-the-latest-status)| Proxmox https://pve.proxmox.com/wiki/HTTPSCertificateConfiguration#Let.27s_Encrypt_using_acme.sh | ||||
| |14|-----| Cloud Linux  https://github.com/Neilpang/le/issues/111 | ||||
| |15|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|OpenBSD | ||||
| |16|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|Mageia | ||||
| 
 | ||||
| For all build statuses, check our [daily build project](https://github.com/Neilpang/acmetest):  | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										19
									
								
								acme.sh
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								acme.sh
									
									
									
									
									
								
							| @ -587,9 +587,9 @@ _post() { | ||||
|     _CURL="$CURL --dump-header $HTTP_HEADER " | ||||
|     _debug "_CURL" "$_CURL" | ||||
|     if [ "$needbase64" ] ; then | ||||
|       response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" 2>"$HTTP_ERROR_FILE" | _base64)" | ||||
|       response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" | _base64)" | ||||
|     else | ||||
|       response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" 2>"$HTTP_ERROR_FILE" )" | ||||
|       response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" )" | ||||
|     fi | ||||
|     _ret="$?" | ||||
|   else | ||||
| @ -611,9 +611,6 @@ _post() { | ||||
|     _sed_i "s/^ *//g" "$HTTP_HEADER" | ||||
|   fi | ||||
|   _debug "_ret" "$_ret" | ||||
|   if [ "$ret" != "0" ] ; then | ||||
|     _err "$(cat "$HTTP_ERROR_FILE")" | ||||
|   fi | ||||
|   printf "%s" "$response" | ||||
|   return $_ret | ||||
| } | ||||
| @ -627,9 +624,9 @@ _get() { | ||||
|   if _exists "curl" ; then | ||||
|     _debug "CURL" "$CURL" | ||||
|     if [ "$onlyheader" ] ; then | ||||
|       $CURL -I -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url 2>"$HTTP_ERROR_FILE" | ||||
|       $CURL -I -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url | ||||
|     else | ||||
|       $CURL    -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url 2>"$HTTP_ERROR_FILE" | ||||
|       $CURL    -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url | ||||
|     fi | ||||
|     ret=$? | ||||
|   else | ||||
| @ -637,14 +634,11 @@ _get() { | ||||
|     if [ "$onlyheader" ] ; then | ||||
|       $WGET --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" -S -O /dev/null $url 2>&1 | sed 's/^[ ]*//g' | ||||
|     else | ||||
|       $WGET --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1"    -O - $url  2>"$HTTP_ERROR_FILE" | ||||
|       $WGET --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1"    -O - $url | ||||
|     fi | ||||
|     ret=$? | ||||
|   fi | ||||
|   _debug "ret" "$ret" | ||||
|   if [ "$ret" != "0" ] ; then | ||||
|     _err "$(cat "$HTTP_ERROR_FILE")" | ||||
|   fi | ||||
|   return $ret | ||||
| } | ||||
| 
 | ||||
| @ -881,7 +875,6 @@ _initpath() { | ||||
|   fi | ||||
|    | ||||
|   HTTP_HEADER="$LE_WORKING_DIR/http.header" | ||||
|   HTTP_ERROR_FILE="$LE_WORKING_DIR/http.err" | ||||
|    | ||||
|   WGET="wget -q" | ||||
|   if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then | ||||
| @ -2037,7 +2030,7 @@ install() { | ||||
|   _info "Installing to $LE_WORKING_DIR" | ||||
| 
 | ||||
|   if ! mkdir -p "$LE_WORKING_DIR" ; then | ||||
|     _err "Can not craete working dir: $LE_WORKING_DIR" | ||||
|     _err "Can not create working dir: $LE_WORKING_DIR" | ||||
|     return 1 | ||||
|   fi | ||||
|    | ||||
|  | ||||
| @ -15,7 +15,7 @@ export CF_Email="xxxx@sss.com" | ||||
| 
 | ||||
| Ok, let's issue cert now: | ||||
| ``` | ||||
| le.sh   --issue   --dns dns_cf   -d aa.com  -d www.aa.com | ||||
| acme.sh   --issue   --dns dns_cf   -d aa.com  -d www.aa.com | ||||
| ``` | ||||
| 
 | ||||
| The `CF_Key` and `CF_Email`  will be saved in `~/.acme.sh/account.conf`, when next time you use cloudflare api, it will reuse this key. | ||||
| @ -37,7 +37,7 @@ export DP_Key="sADDsdasdgdsf" | ||||
| 
 | ||||
| Ok, let's issue cert now: | ||||
| ``` | ||||
| le.sh   --issue   --dns dns_dp   -d aa.com  -d www.aa.com | ||||
| acme.sh   --issue   --dns dns_dp   -d aa.com  -d www.aa.com | ||||
| ``` | ||||
| 
 | ||||
| The `DP_Id` and `DP_Key`  will be saved in `~/.acme.sh/account.conf`, when next time you use dnspod.cn api, it will reuse this key. | ||||
| @ -58,7 +58,7 @@ export CX_Secret="sADDsdasdgdsf" | ||||
| 
 | ||||
| Ok, let's issue cert now: | ||||
| ``` | ||||
| le.sh   --issue   --dns dns_cx   -d aa.com  -d www.aa.com | ||||
| acme.sh   --issue   --dns dns_cx   -d aa.com  -d www.aa.com | ||||
| ``` | ||||
| 
 | ||||
| The `CX_Key` and `CX_Secret`  will be saved in `~/.acme.sh/account.conf`, when next time you use Cloudxns.com api, it will reuse this key. | ||||
| @ -76,7 +76,7 @@ Let's assume you want to name it 'myapi', | ||||
| 3. Then you can use your api to issue cert like: | ||||
| 
 | ||||
| ``` | ||||
| le.sh  --issue  --dns  dns_myapi  -d aa.com  -d www.aa.com | ||||
| acme.sh  --issue  --dns  dns_myapi  -d aa.com  -d www.aa.com | ||||
| ``` | ||||
| 
 | ||||
| For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh) | ||||
|  | ||||
| @ -67,43 +67,3 @@ dns_lexicon_add() { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ####################  Private functions bellow ################################## | ||||
| 
 | ||||
| _info() { | ||||
|   if [[ -z "$2" ]] ; then | ||||
|     echo "[$(date)] $1" | ||||
|   else | ||||
|     echo "[$(date)] $1"="'$2'" | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| _err() { | ||||
|   _info "$@" >&2 | ||||
|   return 1 | ||||
| } | ||||
| 
 | ||||
| _debug() { | ||||
|   if [[ -z "$DEBUG" ]] ; then | ||||
|     return | ||||
|   fi | ||||
|   _err "$@" | ||||
|   return 0 | ||||
| } | ||||
| 
 | ||||
| _debug2() { | ||||
|   if [[ "$DEBUG" -ge "2" ]] ; then | ||||
|     _debug "$@" | ||||
|   fi | ||||
|   return | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ####################  Private functions bellow ################################## | ||||
| 
 | ||||
|  | ||||
| @ -2,15 +2,15 @@ | ||||
| 
 | ||||
| #Here is a sample custom api script. | ||||
| #This file name is "dns_myapi.sh" | ||||
| #So, here must be a method   dns_myapi-add() | ||||
| #So, here must be a method   dns_myapi_add() | ||||
| #Which will be called by acme.sh to add the txt record to your api system. | ||||
| #returns 0 meanst success, otherwise error. | ||||
| #returns 0 means success, otherwise error. | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ########  Public functions ##################### | ||||
| 
 | ||||
| #Usage: add   _acme-challenge.www.domain.com   "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" | ||||
| #Usage: dns_myapi_add   _acme-challenge.www.domain.com   "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" | ||||
| dns_myapi_add() { | ||||
|   fulldomain=$1 | ||||
|   txtvalue=$2 | ||||
| @ -22,16 +22,12 @@ dns_myapi_add() { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ####################  Private functions bellow ################################## | ||||
| 
 | ||||
| _info() { | ||||
|   if [[ -z "$2" ]] ; then | ||||
|   if [ -z "$2" ] ; then | ||||
|     echo "[$(date)] $1" | ||||
|   else | ||||
|     echo "[$(date)] $1"="'$2'" | ||||
|     echo "[$(date)] $1='$2'" | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| @ -41,7 +37,7 @@ _err() { | ||||
| } | ||||
| 
 | ||||
| _debug() { | ||||
|   if [[ -z "$DEBUG" ]] ; then | ||||
|   if [ -z "$DEBUG" ] ; then | ||||
|     return | ||||
|   fi | ||||
|   _err "$@" | ||||
| @ -49,14 +45,8 @@ _debug() { | ||||
| } | ||||
| 
 | ||||
| _debug2() { | ||||
|   if [[ "$DEBUG" -ge "2" ]] ; then | ||||
|   if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then | ||||
|     _debug "$@" | ||||
|   fi | ||||
|   return | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ####################  Private functions bellow ################################## | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user