Skip to content

Commit fca3b02

Browse files
committed
Merge pull request #2667 from flatcar/scripts
app-misc/ca-certificates: Account for certs missing newlines Signed-off-by: Jeremi Piotrowski <[email protected]>
2 parents e00ae5a + f817780 commit fca3b02

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix update-ca-certificates behavior when concatenating certificates with missing trailing newlines. ([flatcar/scripts#2667](https://github.com/flatcar/scripts/pull/2667))

sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/files/update-ca-certificates

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ if [[ ! -e "${CERTBUNDLE}" || "${CERTSDIR}" -nt "${CERTBUNDLE}" ]]; then
3232
trap "rm -f '${CERTSDIR}/${TEMPBUNDLE}'" EXIT
3333

3434
# Use .0 instead of .pem to pull in only what c_rehash validated
35-
cat "${CERTSDIR}"/*.[0-9] > "${TEMPBUNDLE}"
35+
sed --separate '$a\' "${CERTSDIR}"/*.[0-9] >"${TEMPBUNDLE}"
36+
3637
chmod 644 "${TEMPBUNDLE}"
3738
mv -f "${TEMPBUNDLE}" "${CERTBUNDLE}"
3839
trap - EXIT

0 commit comments

Comments
 (0)