title: Wget and Curl stopped working with HTTPS. Wrongly complain about an expired certificate
body: <p>I have a script that runs every day on an Ubuntu 14.04 server. The script is a simple wget command that downloads a file from a remote server and saves it to the local file system:</p>
  
  <pre><code>wget https://example.com/resources/scripts/myfile.php -O myfile.php
  </code></pre>
  
  <p>It has worked fine for months until this morning when suddenly when I run it I get:</p>
  
  <pre><code>--2020-05-30 11:57:16--  https://example.com/resources/scripts/myfile.php
  Resolving example.com (example.com)... xx.xx.xx.xx
  Connecting to example.com (example.com)|xx.xx.xx.xx|:443... connected.
  ERROR: cannot verify example.com's certificate, issued by ‘/C=GB/ST=Greater Manchester/L=Salford/O=Sectigo Limited/CN=Sectigo RSA Domain Validation Secure Server CA’:
    Issued certificate has expired.
  To connect to example.com insecurely, use `--no-check-certificate'.
  </code></pre>
  
  <p>The SSL for the domain is valid and expires in Jan. 2022. Nothing has changed on that front. And yet somehow wget no longer sees that.</p>
  
  <p>Here is another interesting fact. If I run this same exact command on an Ubuntu 18 box, it works like a charm without any complaints. This tells me something is wrong with my Ubuntu 14.04 machine.</p>
  
  <p>Curl produces the same error:</p>
  
  <pre><code>curl https://example.com
  curl: (60) SSL certificate problem: certificate has expired
  </code></pre>
  
  <p><a href="https://stackoverflow.com/a/25048183/1927991">This post</a> suggest that the certificate bundle is out of date. I have downloaded the suggested PEM file and tried running wget with by specifying the --ca-certificate=cacert.pem option, but to no avail.</p>
  
  <p>I have also tried running: <code>apt install ca-certificates</code> and <code>update-ca-certificates</code>, but that did not work either.</p>
  
  <p>Again, everything works great on an Ubuntu 18 box, but not Ubuntu 14 or 16. Also why did it work fine until this morning when I know nobody has touched the box? Clearly something is out of date, but I can't seem to figure out how to fix it.</p>
  
  <p>Does anybody have any suggestions?</p>