user3260912
user3260912

Reputation: 641

CURL returns (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL

I'm trying to download, systematically, the following image:

https://floridakeyswebcams.tv/sloppycam/camarchive/0807.jpg

In Firefox, the image displays fine.

When using CURL or wget, the download fails.

On Ubuntu 18.04 with Open SSL 1.1.0g, it returns the following in curl:

*   Trying 74.209.245.140...
* TCP_NODELAY set
* Connected to floridakeyswebcams.tv (74.209.245.140) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to floridakeyswebcams.tv:443 
* stopped the pause stream!
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to floridakeyswebcams.tv:443 

On a old Samsung Note 3, rooted, with busybox and OpenSSL v1.0.0g, it downloads the file but only a 1 KB empty file.

Ideas?

Upvotes: 21

Views: 82115

Answers (1)

Prateek Paranjpe
Prateek Paranjpe

Reputation: 543

When it works via the browser and doesn't work in the same way from curl, you need to make some changes to your curl request.

The latest versions of Chrome browser supports a very good option to "copy as cURL". This is very handy and will solve most such issues.

To access this option -

  1. Open a new tab
  2. Right click to open the context menu, select Inspect and open the Network tab.
  3. Now paste the URL in the URL bar and go. It will navigate to the image.
  4. Right click on the network request that was successful and showed the image
  5. Inside the "Copy" menu, there is option to "Copy as cURL".
  6. Open a terminal and paste here. This is the curl command that will work and simulate the exact same request as the Chrome browser.

This will work in most cases and definitely works for the link given in the question.

Upvotes: 6

Related Questions