Install and trust a new CA certificate in Linux

Typically, if your linux host is configured to access the internet though a proxy you might have issues accessing HTTPS resources. This is probably because the proxy is acting as a man-in-the-middle and using it's own certificate to re-encrypt things before sending them on to your host.

In this case, you would need to install and trust the certificate being used by the proxy (as long as you trust it)

First, you need to obtain a copy of the certificate in PEM/CRT x509 format (---BEGIN CERTIFICATE--- and ---END CERTIFICATE--- at the top and tail of the file)

Debian based (Debian, Ubuntu etc) distrobutions

cp MY_CERTIFICATE.pem /usr/local/share/ca-certificates/
update-ca-certificates

Voila!

EL (Enterprise Linux (RHEL, Oracle, Rocky etc)) distrobutions

cp MY_CERTIFICATE.pem /etc/pki/ca-trust/source/anchors/
update-ca-trust extract

Done!