Certificate Error when running a wget Command

When we try to run this command in Windows Server , we are having some issues about the certificate.

here is the error:

wget.exe --spider “https://www.mysavings.com/internal/dail
y-tasks.asp”
Spider mode enabled. Check if remote file exists.
–2018-10-12 09:48:41-- https://www.mysavings.com/internal/daily-tasks.asp
Resolving www.mysavings.com… 104.25.201.105, 104.25.202.105, 2606:4700:20::681
9:c969, …
Connecting to www.mysavings.com|104.25.201.105|:443… connected.
ERROR: cannot verify www.mysavings.com’s certificate, issued by /C=GB/ST=Greate r Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO Domain Validation Legacy Se rver CA 2': Unable to locally verify the issuer's authority. ERROR: certificate common name ssl371406.Cloudflaressl.com’ doesn’t match reque
sted host name www.mysavings.com'. To connect to www.mysavings.com insecurely, use –no-check-certificate’.
Unable to establish SSL connection.

What does wget -V print?

1 Like

C:\Program Files\wget>wget.exe -V
GNU Wget 1.11.4

Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://www.gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic [email protected].
Currently maintained by Micah Cowan [email protected].

TLS SNI was standardized in 2003, but wget only added support in version 1.14 in 2012.

You’ll have to upgrade wget or use a different download tool.

2 Likes

What I suspected, the version is too old. 1.19 is the current version.

Conclusion, just upgrade wget and it should be fine. GNU Wget 1.21.3 for Windows should have the most recent version for Windows.

Respectively, Powershell even comes with its own set of commands to send a web request without additional tools.