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
a272ee4f
Commit
a272ee4f
authored
May 31, 2016
by
neil
Browse files
fix get nonce
parent
7012b91f
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
a272ee4f
...
@@ -657,11 +657,17 @@ _send_signed_request() {
...
@@ -657,11 +657,17 @@ _send_signed_request() {
_debug2 payload64 $payload64
_debug2 payload64 $payload64
nonceurl="$API/directory"
nonceurl="$API/directory"
nonce="$(_get $nonceurl "onlyheader" | grep -o "Replay-Nonce:.*$" | head -1 | tr -d "\r\n" | cut -d ' ' -f 2)"
_headers="$(_get $nonceurl "onlyheader")"
if [ "$?" != "0" ] ; then
if [ "$?" != "0" ] ; then
_err "Can not connect to $nonceurl to get nonce."
_err "Can not connect to $nonceurl to get nonce."
return 1
return 1
fi
fi
_debug2 _headers "$_headers"
nonce="$( echo "$_headers" | grep "Replay-Nonce:" | head -1 | tr -d "\r\n " | cut -d ':' -f 2)"
_debug nonce "$nonce"
_debug nonce "$nonce"
protected="$(printf "$HEADERPLACE" | sed "s/NONCE/$nonce/" )"
protected="$(printf "$HEADERPLACE" | sed "s/NONCE/$nonce/" )"
...
...
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