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
29b75109
Commit
29b75109
authored
Nov 04, 2016
by
neilpang
Browse files
add sign error check.
parent
9d548d81
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
29b75109
...
...
@@ -1185,7 +1185,13 @@ _send_signed_request() {
protected64
=
"
$(
printf
"
$protected
"
| _base64 | _urlencode
)
"
_debug3 protected64
"
$protected64
"
sig
=
$(
printf
"%s"
"
$protected64
.
$payload64
"
| _sign
"
$keyfile
"
"sha256"
| _urlencode
)
if
!
_sig_t
=
"
$(
printf
"%s"
"
$protected64
.
$payload64
"
| _sign
"
$keyfile
"
"sha256"
)
"
;
then
_err
"Sign request failed."
return
1
fi
_debug3 _sig_t
"
$_sig_t
"
sig
=
"
$(
printf
"%s"
"
$_sig_t
"
| _urlencode
)
"
_debug3 sig
"
$sig
"
body
=
"{
\"
header
\"
:
$JWK_HEADER
,
\"
protected
\"
:
\"
$protected64
\"
,
\"
payload
\"
:
\"
$payload64
\"
,
\"
signature
\"
:
\"
$sig
\"
}"
...
...
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