Openssl is unable to establish SSL connection, when I try to access a local site through third party tools like wget

I want to monitor the index of a site periodically on our local network out of browsers. I tried to download it by wget in Windows10:

> wget --no-check-certificate --no-hsts --content-on-error --ignore-length --unlink --server-response --show-progress --verbose https://172.*.*.*:*/app

But it couldn't fetch the page. Here is the result:

--2019-02-02 16:56:01--  https://172.*.*.*:*/app
Connecting to 172.*.*.*:*... connected.
OpenSSL: error:2406F079:random number generator:RAND_load_file:Cannot open file
Unable to establish SSL connection.

I also tried with other tools like urlwatch and curl. None of them were able to get access to that page! Is there any idea? Here is the error given by urlwatch:

HTTPSConnectionPool(host='172.*.*.*', port=*):
Max retries exceeded with url: /app
(Caused by SSLError(SSLError(1,
'[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)')))

Solution 1:

Why You don't try curl instead ?

For your reference go to this site

It is very common to replace wget with curl under some scenarios. Probably this case is a good one to go with curl instead.

You can check this short example with Windows 10

If the problem persist, definitely You will require to update ssl to the latest version or use Open SSL library for Windows 10. To avoid risk installing third party installer, get further details from here.

The Git for Windows installation already contains the openssl.exe You need, You can get it from here. I have used this solution in the past and worked well.

Check this for your reference as well.

Solution 2:

There is no reason in Windows to use a third-party tool to download a file, when such tools already exist natively, especially if that tool is badly adapted to Windows.

For downloading a file, you may use PowerShell with the methods of Invoke-WebRequest or Client.DownloadFile, and here are some examples:

    Invoke-WebRequest -Uri 'https://download.sysinternals.com/files/Handle.zip' -OutFile C:\handle.zip
    download.file("https://download.sysinternals.com/files/Handle.zip",destfile="C:\handle.zip")