Skip to content

Commit

Permalink
Merge pull request #2667 from flatcar/scripts
Browse files Browse the repository at this point in the history
app-misc/ca-certificates: Account for certs missing newlines

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
  • Loading branch information
jepio committed Feb 24, 2025
2 parents e00ae5a + f817780 commit fca3b02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fca3b02

Please sign in to comment.