HTTPS/SSL With wget

If you’re getting the following error when trying to download files over https with wget:

C:\Documents and Settings\davidharrison\Desktop>wget https://www.anz.com/aus/ib/img/photo_family.jpg

–10:32:21– https://www.anz.com/aus/ib/img/photo_family.jpg

=> `photo_family.jpg’

Resolving www.anz.com… 202.2.59.40, 202.2.56.40

Connecting to www.anz.com|202.2.59.40|:443… connected.

ERROR: Certificate verification error for www.anz.com: unable to get local issuer certificate

To connect to www.anz.com insecurely, use `–no-check-certificate’.

Unable to establish SSL connection.

… you might want to check out curl’s CA Extract. This allows you to extract a wget-compatible CA bundle file from those incuded with Mozilla software, which will allow verification of server certificates. They also make versions available that you can download directly, so you can simply download (for example) cacert.pem and then invoke wget thusly:

wget –ca-certificate=cacert.pem [https url]

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.