Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 935
user3260912 Avatar asked Oct 24 '18 12:10

user3260912


People also ask

What does Ssl_error_syscall mean?

SSL_ERROR_SYSCALL typically occurs when the server side is using an SSL certificate to authenticate.


1 Answers

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.

like image 79
Prateek Paranjpe Avatar answered Sep 19 '22 12:09

Prateek Paranjpe