CURLE_SSL_CONNECT_ERROR

Get help for specific problems
Posts: 6
Joined: 11 Jul 2019

okosiyas

Hi

This time it's probably a bug report.

I have upgraded from FreeFileSync 11.13 to FreeFileSync 11.14.

File synchronization is performed periodically from FTPS to a local folder using batches.

This time, the following error log is displayed and synchronization has stopped.

=============
CURLE_SSL_CONNECT_ERROR: error:0A000126:SSL routines::unexpected eof while reading
234 AUTH command ok. Expecting TLS Negotiation. [curl_easy_perform]
===========

I was able to list and download it with an FTP client. So it doesn't seem to be an FTP server issue.


After downgrading to FreeFileSync 11.13, it was resolved and operation resumed.


I hope this issue will be fixed in the next version.


I am always grateful for your help.

Thanks to FreeFileSync.
User avatar
Site Admin
Posts: 7051
Joined: 9 Dec 2007

Zenju

OpenSSL 3 reintroduces the OpenSSL 1.1.1e EOF behavior that curl can't (yet?) handle: https://github.com/curl/curl/issues/5138

luckily OpenSSL 3 offers an option for the old behavior: SSL_OP_IGNORE_UNEXPECTED_EOF

Does the following version work for you? https://www.mediafire.com/file/xvt79ntq18qo0yk/FreeFileSync_11.15_%255BBeta%255D_Windows_Setup%25283%2529.exe
Posts: 6
Joined: 11 Jul 2019

okosiyas

Thank you for your support.

I tried the beta version.

Unfortunately, the file list didn't show up.

However, the log does not show any errors, it shows that it completed successfully.

Sync is not working because the list is not actually displayed.

I downgraded to the old version again and confirmed that it works normally.

Thank you for your support.
User avatar
Site Admin
Posts: 7051
Joined: 9 Dec 2007

Zenju

Okay, take 2: Instead of setting SSL_OP_IGNORE_UNEXPECTED_EOF, let's add an exception for servers that close a connection unexpectedly via
if (err == SSL_ERROR_SSL &&
    ERR_GET_REASON(ERR_peek_last_error()) == SSL_R_UNEXPECTED_EOF_WHILE_READING)
Does this version work? https://www.mediafire.com/file/8wwusyw5j0aqd09/FreeFileSync_11.15_%255BBeta%255D_Windows_Setup%25284%2529.exe
User avatar
Site Admin
Posts: 7051
Joined: 9 Dec 2007

Zenju

Here's yet another test implementation. Does it work?
(sets SSL_OP_IGNORE_UNEXPECTED_EOF via CURLOPT_SSL_CTX_FUNCTION as suggested here)

https://www.mediafire.com/file/eg27yx4m2ksbelu/FreeFileSync_11.15_%255BBeta%255D_Windows_Setup%25285%2529.exe
Posts: 6
Joined: 11 Jul 2019

okosiyas

Sorry for the late test.

I tried this installer but didn't see the directory.

I reverted to the original version.
Okay, take 2: Instead of setting SSL_OP_IGNORE_UNEXPECTED_EOF, let's add an exception for servers that close a connection unexpectedly via
if (err == SSL_ERROR_SSL &&
    ERR_GET_REASON(ERR_peek_last_error()) == SSL_R_UNEXPECTED_EOF_WHILE_READING)
Does this version work? https://www.mediafire.com/file/8wwusyw5j0aqd09/FreeFileSync_11.15_%255BBeta%255D_Windows_Setup%25284%2529.exe Zenju, 30 Sep 2021, 10:46
Posts: 6
Joined: 11 Jul 2019

okosiyas

I tried the installer. But the directory was not displayed.

I reverted to the original version.

Thank you for your support.
Here's yet another test implementation. Does it work?
(sets SSL_OP_IGNORE_UNEXPECTED_EOF via CURLOPT_SSL_CTX_FUNCTION as suggested here)

https://www.mediafire.com/file/eg27yx4m2ksbelu/FreeFileSync_11.15_%255BBeta%255D_Windows_Setup%25285%2529.exe Zenju, 01 Oct 2021, 09:43
User avatar
Site Admin
Posts: 7051
Joined: 9 Dec 2007

Zenju

Then I'm at a loss regarding what else to try. I would need to see a real test server that exhibits this "unexpected eof while reading" to debug this.