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
d22b7938
"vscode:/vscode.git/clone" did not exist on "19b46c9a0938ccda1bfd61afb06c63bb2f468398"
Commit
d22b7938
authored
Nov 04, 2016
by
neilpang
Browse files
fix old version openssl issue for ecc key
parent
29b75109
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
d22b7938
...
...
@@ -891,6 +891,26 @@ _calcjwk() {
crv
=
"
$(
openssl ec
-in
$keyfile
-noout
-text
2>/dev/null |
grep
"^NIST CURVE:"
|
cut
-d
":"
-f
2 |
tr
-d
"
\r\n
"
)
"
_debug3 crv
"
$crv
"
if
[
-z
"
$crv
"
]
;
then
_debug
"Let's try ASN1 OID"
crv_oid
=
"
$(
openssl ec
-in
$keyfile
-noout
-text
2>/dev/null |
grep
"^ASN1 OID:"
|
cut
-d
":"
-f
2 |
tr
-d
"
\r\n
"
)
"
case
"
${
crv_oid
}
"
in
"prime256v1"
)
crv
=
"P-256"
;;
"secp384r1"
)
crv
=
"P-384"
;;
"secp521r1"
)
crv
=
"P-521"
;;
*
)
_err
"ECC oid :
$crv_oid
"
return
1
;;
_debug3 crv
"
$crv
"
fi
pubi
=
"
$(
openssl ec
-in
$keyfile
-noout
-text
2>/dev/null |
grep
-n
pub: |
cut
-d
:
-f
1
)
"
pubi
=
$(
_math
$pubi
+ 1
)
_debug3 pubi
"
$pubi
"
...
...
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