From: Martin Bark <martin@barkynet.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/3] package/ca-certificates: don't hash certificates.crt
Date: Sat, 16 Jun 2018 23:05:59 +0100 [thread overview]
Message-ID: <20180616220601.4629-2-martin@barkynet.com> (raw)
In-Reply-To: <20180616220601.4629-1-martin@barkynet.com>
Currently c_rehash mistakenly hashes the certificates bundle
certificates.crt resulting in ${TAGET_DIR}/etc/ssl/certs/128805a3.0
incorrectly linking to ca-certificates.crt when it should be linked to
EE_Certification_Centre_Root_CA_2.pem
To fix this install certificates.crt to /etc/ssl/certs after we run
c_rehash to prevent it getting hashed by mistake.
Note: $(TARGET_DIR)/etc/ssl/certs/ is already removed during install so
this fix also works for rebuilds.
Signed-off-by: Martin Bark <martin@barkynet.com>
---
Changes v1 -> v2:
- reword commit message and improve creation of ca-certificates.crt
(Suggested By Peter Korsgaard)
---
package/ca-certificates/ca-certificates.mk | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/package/ca-certificates/ca-certificates.mk b/package/ca-certificates/ca-certificates.mk
index c19d37788b..9685d0e6f0 100644
--- a/package/ca-certificates/ca-certificates.mk
+++ b/package/ca-certificates/ca-certificates.mk
@@ -33,11 +33,15 @@ define CA_CERTIFICATES_INSTALL_TARGET_CMDS
cd $(TARGET_DIR) ;\
for i in `find usr/share/ca-certificates -name "*.crt"` ; do \
ln -sf ../../../$$i etc/ssl/certs/`basename $${i} .crt`.pem ;\
- cat $$i >>etc/ssl/certs/ca-certificates.crt ;\
- done
+ cat $$i ;\
+ done >$(@D)/ca-certificates.crt
# Create symlinks to the certificates by their hash values
$(HOST_DIR)/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
+
+ # Install the certificates bundle
+ $(INSTALL) -D -m 644 $(@D)/ca-certificates.crt \
+ $(TARGET_DIR)/etc/ssl/certs/ca-certificates.crt
endef
$(eval $(generic-package))
--
2.17.1
next prev parent reply other threads:[~2018-06-16 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-16 22:05 [Buildroot] [PATCH v2 0/3] package/ca-certificates improvements Martin Bark
2018-06-16 22:05 ` Martin Bark [this message]
2018-06-17 19:25 ` [Buildroot] [PATCH v2 1/3] package/ca-certificates: don't hash certificates.crt Thomas Petazzoni
2018-06-18 9:51 ` Martin Bark
2018-06-18 14:39 ` Thomas Petazzoni
2018-06-21 22:04 ` Martin Bark
2018-10-21 13:15 ` Arnout Vandecappelle
2018-10-21 13:38 ` Arnout Vandecappelle
2018-10-21 14:03 ` Martin Bark
2018-10-24 12:32 ` Peter Korsgaard
2018-06-16 22:06 ` [Buildroot] [PATCH v2 2/3] package/ca-certificates: fix rebuilds Martin Bark
2018-06-16 22:06 ` [Buildroot] [PATCH v2 3/3] package/ca-certificates: create ca-certificates.crt reproducibly Martin Bark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180616220601.4629-2-martin@barkynet.com \
--to=martin@barkynet.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox