mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-30 07:22:44 +00:00
Fix empty line in certificate file generation
_split_cert_chain: Filter out empty lines in resulting ca certificate file.
This commit is contained in:
parent
4db7f6f59c
commit
6ba04cec16
4
acme.sh
4
acme.sh
@ -4988,9 +4988,9 @@ _split_cert_chain() {
|
||||
cat "$_certf" >"$_fullchainf"
|
||||
_end_n="$(grep -n -- "$END_CERT" "$_fullchainf" | _head_n 1 | cut -d : -f 1)"
|
||||
_debug _end_n "$_end_n"
|
||||
sed -n "1,${_end_n}p" "$_fullchainf" >"$_certf"
|
||||
sed -n "1,${_end_n}{/^$/!p}" "$_fullchainf" >"$_certf"
|
||||
_end_n="$(_math $_end_n + 1)"
|
||||
sed -n "${_end_n},9999p" "$_fullchainf" >"$_caf"
|
||||
sed -n "${_end_n},9999{/^$/!p}" "$_fullchainf" >"$_caf"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user