FreeBSD wget cannot verify certificate, issued by Let’s Encrypt

When using wget on FreeBSD to download a file from a website with a Let’s Encrypt SSL certificate, you may encounter an error that the certificate cannot be verified. This can occur if the root CA certificate for Let’s Encrypt is not installed on your system.

To resolve this issue, you can install the Let’s Encrypt root CA certificate on your FreeBSD system. One way to do this is to use the curl command to download the certificate and then move it to the proper location on the system:

# Download the Let's Encrypt root CA certificate
curl https://letsencrypt.org/certs/isrgrootx1.pem -o /usr/local/share/certs/isrgrootx1.pem

# Add the certificate to the system trust store
sudo trust anchor /usr/local/share/certs/isrgrootx1.pem

Alternatively, you can install the certbot package to manage the Let’s Encrypt certificates, it will take care of installing the necessary root CA certificates.

sudo pkg install certbot

Once you’ve installed the certificate, wget should be able to verify the SSL certificate and download the file without issue.

Please note that this is one of the solution, the cause of the problem might have multiple reasons, it is always better to check the SSL certificate and the date/time of your system.

Leave a Comment