fabriciocolombo/delphi-rest-client-api

Error connecting with SSL. EOF was observed that violates the protocol

Opened this issue · 2 comments

raised exception class EIdOSSLConnectError with message 'Error connecting with SSL. EOF was observed that violates the protocol'.

My application is raising the above error. I can't seem to find what exactly is causing it. We are using Indy to make the connection.

Are you using Windows 7? I have come across similar symptoms when dealing with REST and GitHub. Please review this comment that I posted in exercism/windows-installer#33. For me, the upshot was that Windows is trying to use an older version of TLS (likely 1.0) and the REST server doesn't support that version. My comment contains instructions from Microsoft on how to update settings in the registry to allow Windows to support newer versions of TLS.

Disclaimer: I am not using any code from this REPO. My experience stems from using the REST Client libraries provided by Delphi 10.2.x.

I hope there is some value for you in this, I just re-read your original comment, your error message is different than what I dealt with recently...

The problem is here: https://github.com/fabriciocolombo/delphi-rest-client-api/blob/master/src/HttpConnectionIndy.pas#L114

You need to use Indy 10 in Delphi 7 and use sslvSSLv23 here, not sslvTLSv1. But you need to have the correct versions of libeay32.dll and ssleay32.dll from OpenSSL in your project folder.

If you need to use both HTTP and HTTPS in your project, you can make this setting a published property on the RestClient component and pass it as an argument to the THttpConnectionIndy.Create constructor, but that's a dirty trick. Sorry for my English.

2023-01-26_212827

openssl_libs.zip