Browse Source

fix format

master
neilpang 8 years ago
parent
commit
16d79ebaac
  1. 2
      acme.sh
  2. 24
      dnsapi/dns_aws.sh

2
acme.sh

@ -335,7 +335,7 @@ _hex() {
_str_len=${#_str}
_h_i=1
while [ "$_h_i" -le "$_str_len" ]; do
_str_c="$(printf "%s" "$_str" | cut -c "$_h_i" )"
_str_c="$(printf "%s" "$_str" | cut -c "$_h_i")"
printf "%02x" "'$_str_c"
_h_i="$(_math "$_h_i" + 1)"
done

24
dnsapi/dns_aws.sh

@ -46,18 +46,15 @@ dns_aws_add() {
return 0
fi
return 1;
return 1
}
#fulldomain
dns_aws_rm() {
fulldomain=$1
}
#################### Private functions bellow ##################################
_get_root() {
@ -96,7 +93,6 @@ _get_root() {
return 1
}
#method uri qstr data
aws_rest() {
mtd="$1"
@ -137,13 +133,13 @@ aws_rest() {
CanonicalRequest="$mtd\n$CanonicalURI\n$CanonicalQueryString\n$CanonicalHeaders\n$SignedHeaders\n$(printf "%s" "$RequestPayload" | _digest "$Hash" hex)"
_debug2 CanonicalRequest "$CanonicalRequest"
HashedCanonicalRequest="$(printf "$CanonicalRequest%s" | _digest "$Hash" hex )"
HashedCanonicalRequest="$(printf "$CanonicalRequest%s" | _digest "$Hash" hex)"
_debug2 HashedCanonicalRequest "$HashedCanonicalRequest"
Algorithm="AWS4-HMAC-SHA256"
_debug2 Algorithm "$Algorithm"
RequestDateOnly="$(echo "$RequestDate" | cut -c 1-8 )"
RequestDateOnly="$(echo "$RequestDate" | cut -c 1-8)"
_debug2 RequestDateOnly "$RequestDateOnly"
Region="us-east-1"
@ -204,17 +200,3 @@ aws_rest() {
return "$_ret"
}
Loading…
Cancel
Save