mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-25 14:41:40 +00:00
This commit is contained in:
parent
9ff53fea98
commit
e6df1828d9
14
acme.sh
14
acme.sh
@ -1006,10 +1006,20 @@ _createkey() {
|
||||
|
||||
if _isEccKey "$length"; then
|
||||
_debug "Using ec name: $eccname"
|
||||
${ACME_OPENSSL_BIN:-openssl} ecparam -name "$eccname" -genkey 2>/dev/null >"$f"
|
||||
if _opkey="$(${ACME_OPENSSL_BIN:-openssl} ecparam -name "$eccname" -genkey 2>/dev/null)"; then
|
||||
echo "$_opkey" >"$f"
|
||||
else
|
||||
_err "error ecc key name: $eccname"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
_debug "Using RSA: $length"
|
||||
${ACME_OPENSSL_BIN:-openssl} genrsa "$length" 2>/dev/null >"$f"
|
||||
if _opkey="$(${ACME_OPENSSL_BIN:-openssl} genrsa "$length" 2>/dev/null)"; then
|
||||
echo "$_opkey" >"$f"
|
||||
else
|
||||
_err "error rsa key: $length"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user