mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 15:02:03 +00:00
add more error check
This commit is contained in:
parent
cae9cee295
commit
67184d7b20
7
acme.sh
7
acme.sh
@ -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")"
|
||||||
|
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user