If you are trying to use wget
on a FreeBSD system to download a file from a website and you see an error message saying "cannot verify certificate, issued by Let's Encrypt," it means that wget
is unable to verify the SSL certificate of the website.
This can happen if the certificate chain is not complete or if the certificate is not trusted by the system.
To fix this issue, you can try the following:
pkg update -f pkg install ca_root_nss
This will update the CA certificates and install the ca_root_nss
package, which contains a list of trusted CA certificates.
openssl s_client -showcerts -connect example.com:443 < /dev/null 2> /dev/null | openssl x509 -outform PEM > example.pem
Replace example.com
with the domain name of the website and example.pem
with the name of the certificate file. This will download the certificate and save it to the example.pem
file.
Then, you can add the certificate to the list of trusted certificates by running the following command:
trust anchor example.pem
This will add the certificate to the list of trusted certificates.