Ben Brugman
04/02/2024, 7:35 AMYousaf Nabi (pactflow.io)
Your understanding of the _SSL_CERT_DIR_ environment variable is correct. The directory that is specified in the variable is meant for trusted root certificates (but not for intermediate ones!).
When copying the root certificates over to this directory, they have to follow a certain naming convention. The certificate should be in the regular PEM format, but the file name must be named
[HASH].0
where [HASH] is the hashed value of the certificate’s subject. You can find out this hash value with the following command (replace root.cer with the file name of your root certificate)
openssl x509 -subject_hash -in root.cerfor me with gitea
gitea cert --host git
ls
cert.pem key.pem
openssl x509 -subject_hash -in cert.pem
43b31b52
cp cert.pem 43b31b52.0
SSL_CERT_DIR=$PWD curl <https://git/>
How were the certs setup in your SSL_CERT_DIR?Ben Brugman
04/03/2024, 12:19 PMYousaf Nabi (pactflow.io)
Ben Brugman
04/04/2024, 8:18 AM