ca-certificates: Add certificate bundle package
authorDaniel Dickinson <lede@daniel.thecshore.com>
Fri, 13 May 2016 10:30:25 +0000 (06:30 -0400)
committerJo-Philipp Wich <jo@mein.io>
Wed, 18 May 2016 20:17:28 +0000 (22:17 +0200)
Some SSL applications requires a certificates bundle rather
than a directory containing certificates.  For thos applications
we build the ca-bundle package

Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
package/system/ca-certificates/Makefile

index 9b6dbd61fee61c5e10415f4235f693f2c192cd77..859095215402ebac45035dc4a7d09dfcfec76d47 100644 (file)
@@ -26,6 +26,13 @@ define Package/ca-certificates
   PKGARCH:=all
 endef
 
+define Package/ca-bundle
+  SECTION:=base
+  CATEGORY:=Base system
+  TITLE:=System CA certificates as a bundle
+  PKGARCH:=all
+endef
+
 define Build/Install
        mkdir -p \
                $(PKG_INSTALL_DIR)/usr/sbin \
@@ -47,4 +54,9 @@ define Package/ca-certificates/install
        done
 endef
 
+define Package/ca-bundle/install
+       $(INSTALL_DIR) $(1)/etc/ssl/certs
+       cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
+endef
 $(eval $(call BuildPackage,ca-certificates))
+$(eval $(call BuildPackage,ca-bundle))