Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
7012b91f
Commit
7012b91f
authored
May 31, 2016
by
neil
Browse files
add err check for post and get
parent
16679b57
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
7012b91f
...
...
@@ -658,7 +658,10 @@ _send_signed_request() {
nonceurl
=
"
$API
/directory"
nonce
=
"
$(
_get
$nonceurl
"onlyheader"
|
grep
-o
"Replay-Nonce:.*$"
|
head
-1
|
tr
-d
"
\r\n
"
|
cut
-d
' '
-f
2
)
"
if
[
"
$?
"
!=
"0"
]
;
then
_err
"Can not connect to
$nonceurl
to get nonce."
return
1
fi
_debug nonce
"
$nonce
"
protected
=
"
$(
printf
"
$HEADERPLACE
"
|
sed
"s/NONCE/
$nonce
/"
)
"
...
...
@@ -675,7 +678,10 @@ _send_signed_request() {
response
=
"
$(
_post
"
$body
"
$url
"
$needbase64
"
)
"
if
[
"
$?
"
!=
"0"
]
;
then
_err
"Can not post to
$url
."
return
1
fi
_debug2 original
"
$response
"
response
=
"
$(
echo
"
$response
"
| _normalizeJson
)
"
...
...
@@ -1434,13 +1440,13 @@ issue() {
sleep
5
_debug
"checking"
response
=
"
$(
_get
$uri
| _normalizeJson
)
"
_debug2 response
"
$response
"
if
[
"
$?
"
!=
"0"
]
;
then
_err
"
$d
:Verify error:
$response
"
_clearupwebbroot
"
$_currentRoot
"
"
$removelevel
"
"
$token
"
_clearup
return
1
fi
_debug2 response
"
$response
"
status
=
$(
echo
$response
| egrep
-o
'"status":"[^"]*'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
if
[
"
$status
"
=
"valid"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment