aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/ca-certificates/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-09-25 07:38:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-09-25 07:38:02 +0000
commita795c53d4b1d66f6ae5c8ee40a84e505491867f0 (patch)
treef5d16f631319214a3d960f7e4c01ed6ea1250a02 /package/system/ca-certificates/Makefile
parent97fc855e6fac2c6afa37110b841935a657dc4d1c (diff)
downloadupstream-a795c53d4b1d66f6ae5c8ee40a84e505491867f0.tar.gz
upstream-a795c53d4b1d66f6ae5c8ee40a84e505491867f0.tar.bz2
upstream-a795c53d4b1d66f6ae5c8ee40a84e505491867f0.zip
ca-certificates: create symbolic link for certificate hashes
Implementing "add-cert.sh" functionality described at http://wiki.openwrt.org/doc/howto/wget-ssl-certs into Makefile otherwise you need to create symbolic links for certificate hashes yourself. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42660 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/system/ca-certificates/Makefile')
-rw-r--r--package/system/ca-certificates/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index 7f38c86653..08a853fd44 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -34,6 +34,15 @@ endef
define Package/ca-certificates/install
$(INSTALL_DIR) $(1)/etc/ssl/certs
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt $(1)/etc/ssl/certs/
+
+ for CERTFILE in `ls -1 $(1)/etc/ssl/certs`; do \
+ HASH=`openssl x509 -hash -noout -in $(1)/etc/ssl/certs/$$$$CERTFILE` ; \
+ SUFFIX=0 ; \
+ while [ -h "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
+ let "SUFFIX += 1" ; \
+ done ; \
+ ln -s "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
+ done
endef
$(eval $(call BuildPackage,ca-certificates))