Skip to content
ThinStation edited this page May 1, 2020 · 15 revisions

How to add a certificate to a build

Your certificates will need to be base64(PEM) encoded and suffixed as either .crt or .pem

You will need to create a folder in /build/packages that contains a certs folder

 mkdir -p /build/packages/my-certificates/certs

Next create a dependencies file that pulls in ca-bundle

 echo ca-bundle > /build/packages/my-certificates/dependencies

within the certs folder, we can make a folder called ca to hold Certificate Authority certs.

 mkdir -p /build/packages/my-certificates/certs/ca

We now need to include our new package in our build

 echo "package my-certificates" >> /build/build.conf

You can drop any CA certificates you want in the /build/packages/my-certificates/certs/ca, and then run build. This should link your cert into all the right places. Additionally, if you want to specifically trust a webserver without a CA chain, you can drop the server certificate into /build/packages/my-certificates/certs/trusted