Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
b88e64f0
Commit
b88e64f0
authored
Feb 17, 2017
by
neil
Committed by
GitHub
Feb 17, 2017
Browse files
Merge pull request #632 from Neilpang/dev
compatible to openssl 0.9 for hmac function
parents
c6dcf2a0
c7043299
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
b88e64f0
...
@@ -740,9 +740,9 @@ _hmac() {
...
@@ -740,9 +740,9 @@ _hmac() {
if
[
"
$alg
"
=
"sha256"
]
||
[
"
$alg
"
=
"sha1"
]
;
then
if
[
"
$alg
"
=
"sha256"
]
||
[
"
$alg
"
=
"sha1"
]
;
then
if
[
"
$outputhex
"
]
;
then
if
[
"
$outputhex
"
]
;
then
$OPENSSL_BIN
dgst -
"
$alg
"
-mac
HMAC
-macopt
"hexkey:
$secret_hex
"
|
cut
-d
=
-f
2 |
tr
-d
' '
(
$OPENSSL_BIN
dgst -
"
$alg
"
-mac
HMAC
-macopt
"hexkey:
$secret_hex
"
2>/dev/null
||
$OPENSSL_BIN
dgst -
"
$alg
"
-hmac
"
$(
printf
"%s"
"
$secret_hex
"
| _h2b
)
"
)
|
cut
-d
=
-f
2 |
tr
-d
' '
else
else
$OPENSSL_BIN
dgst -
"
$alg
"
-mac
HMAC
-macopt
"hexkey:
$secret_hex
"
-binary
$OPENSSL_BIN
dgst -
"
$alg
"
-mac
HMAC
-macopt
"hexkey:
$secret_hex
"
-binary
2>/dev/null
||
$OPENSSL_BIN
dgst -
"
$alg
"
-hmac
"
$(
printf
"%s"
"
$secret_hex
"
| _h2b
)
"
-binary
fi
fi
else
else
_err
"
$alg
is not supported yet"
_err
"
$alg
is not supported yet"
...
...
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