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
b5d19184
Commit
b5d19184
authored
Nov 04, 2016
by
neil
Committed by
GitHub
Nov 04, 2016
Browse files
Merge pull request #367 from Neilpang/dev
Dev
parents
dfdd48b9
d018be5d
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
b5d19184
...
@@ -454,7 +454,12 @@ _sign() {
...
@@ -454,7 +454,12 @@ _sign() {
if
grep
"BEGIN RSA PRIVATE KEY"
"
$keyfile
"
>
/dev/null 2>&1
;
then
if
grep
"BEGIN RSA PRIVATE KEY"
"
$keyfile
"
>
/dev/null 2>&1
;
then
$_sign_openssl
| _base64
$_sign_openssl
| _base64
elif
grep
"BEGIN EC PRIVATE KEY"
"
$keyfile
"
>
/dev/null 2>&1
;
then
elif
grep
"BEGIN EC PRIVATE KEY"
"
$keyfile
"
>
/dev/null 2>&1
;
then
_signedECText
=
"
$(
$_sign_openssl
| openssl asn1parse
-inform
DER
)
"
if
!
_signedECText
=
"
$(
$_sign_openssl
| openssl asn1parse
-inform
DER
)
"
;
then
_err
"Sign failed:
$_sign_openssl
"
_err
"Key file:
$keyfile
"
_err
"Key content:
$(
cat
"
$keyfile
"
|
wc
-l
)
lises"
return
1
fi
_debug3
"_signedECText"
"
$_signedECText
"
_debug3
"_signedECText"
"
$_signedECText
"
_ec_r
=
"
$(
echo
"
$_signedECText
"
| _head_n 2 | _tail_n 1 |
cut
-d
:
-f
4 |
tr
-d
"
\r\n
"
)
"
_ec_r
=
"
$(
echo
"
$_signedECText
"
| _head_n 2 | _tail_n 1 |
cut
-d
:
-f
4 |
tr
-d
"
\r\n
"
)
"
_debug3
"_ec_r"
"
$_ec_r
"
_debug3
"_ec_r"
"
$_ec_r
"
...
...
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