mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
Merge pull request #2667 from flatcar/scripts
app-misc/ca-certificates: Account for certs missing newlines Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
commit
fca3b02c19
@ -0,0 +1 @@
|
||||
- Fix update-ca-certificates behavior when concatenating certificates with missing trailing newlines. ([flatcar/scripts#2667](https://github.com/flatcar/scripts/pull/2667))
|
||||
@ -32,7 +32,8 @@ if [[ ! -e "${CERTBUNDLE}" || "${CERTSDIR}" -nt "${CERTBUNDLE}" ]]; then
|
||||
trap "rm -f '${CERTSDIR}/${TEMPBUNDLE}'" EXIT
|
||||
|
||||
# Use .0 instead of .pem to pull in only what c_rehash validated
|
||||
cat "${CERTSDIR}"/*.[0-9] > "${TEMPBUNDLE}"
|
||||
sed --separate '$a\' "${CERTSDIR}"/*.[0-9] >"${TEMPBUNDLE}"
|
||||
|
||||
chmod 644 "${TEMPBUNDLE}"
|
||||
mv -f "${TEMPBUNDLE}" "${CERTBUNDLE}"
|
||||
trap - EXIT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user