How to fix SSL problem in old macOS

Rename /etc/ssl/cert.pem to something else.

Download the latest cacert.pem from and save it to /etc/ssl/cert.pem

Here is the short script, which could be run directly from the command line via Terminal

cd /etc/ssl
sudo mv -f cert.pem cert.pem.bak
sudo wget -O cert.pem

or use the shorthand

sudo cd /etc/ssl && mv -f cert.pem cert.pem.bak && wget -O cert.pem