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
d866b3df
Commit
d866b3df
authored
Nov 09, 2020
by
Ed Lynes
Browse files
convert key to hex before calling _hmac
parent
97f3fb44
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_edgedns.sh
View file @
d866b3df
...
...
@@ -443,7 +443,9 @@ _edgedns_base64_hmac_sha256() {
_secure_debug2
"encoded data"
"
$encoded_data
"
_secure_debug2
"encoded key"
"
$encoded_key
"
data_sig
=
"
$(
echo
"
$encoded_data
"
|
tr
-d
"
\n\r
"
|
${
ACME_OPENSSL_BIN
:-
openssl
}
dgst
-sha256
-hmac
"
$encoded_key
"
-binary
| _base64
)
"
encoded_key_hex
=
$(
printf
"%s"
"
$encoded_key
"
| _hex_dump |
tr
-d
' '
)
data_sig
=
"
$(
echo
"
$encoded_data
"
|
tr
-d
"
\n\r
"
| _hmac sha256
$encoded_key_hex
| _base64
)
"
_secure_debug2
"data_sig:"
"
$data_sig
"
_hmac_out
=
"
$(
echo
"
$data_sig
"
|
tr
-d
"
\n\r
"
| iconv
-f
utf-8
)
"
_secure_debug2
"hmac"
"
$_hmac_out
"
...
...
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