Skip to contentSkip to conversation

package/libcurl: also specify the CA bundle location

Buildroot Thomas Perale via buildroot 1 participant 1 message Feb 13

lore
Share & tools
lore
#0 lore raw

commit: https://gitlab.com/buildroot.org/buildroot/-/commit/66dcc3e2a96cb418350cc9af578219530b1b4140
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/2025.11.x

When given a certificate directory with --with-ca-path, curl doesn't list the files in that directory. Instead, it uses the certificate hash to directly open the requested CA certificate. Therefore, putting a bundle in that directory and removing all the individual certificates is not possible.

In order to support use of the bundle, a separate configuration option --with-ca-bundle is needed. With this option, it is possible to remove the individual certificates and include just the bundle, which reduces the size of the root filesystem a bit.

Note that the bundle is generated by the ca-certificates package, which also installs the individual certificates and the hash symlinks. It keeps both individual certificates and the bundle in the target.

(cherry picked from commit 5a63ee3c09e95bfd7afd7822a1a9254e361b940f)
---
 package/libcurl/libcurl.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/libcurl/libcurl.mk +2 -1
index e1e5a7facb..d9a712bcb6 100644
@@ -58,7 +58,8 @@ endif
 ifeq ($(BR2_PACKAGE_LIBCURL_OPENSSL),y)
 LIBCURL_DEPENDENCIES += openssl
 LIBCURL_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr \
-	--with-ca-path=/etc/ssl/certs
+	--with-ca-path=/etc/ssl/certs \
+	--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
 else
 LIBCURL_CONF_OPTS += --without-openssl
 endif

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot