My platform is this
- OS X Yosemite 10.10.5
- newest Indy (10.6.2.0, download 2016 March 13 — Indy10_5346.zip)
- Lazarus 1.4.4
Concerning OpenSSL versions I have tried:
- HomeBrew OpenSSL installed like this: «brew install openssl
—universal» - Built-in (0.9.8) OS X supplied in /usr/lib/
I am getting error:
EIdOSSLConnecError Error connecting with SSL — EOF was observed that
violates the protocolIn file Protocols/IdSSLOpenSSLHeaders.pas at line 19418
However, as I am using newest of everything — why am I be getting this error?
(Happens in call to OpenEncodedConnection)
Here’s how I setup my Indy HTTP client OpenSSL handler:
FIOHandlerOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create;
FIOHandlerOpenSSL.SSLOptions.SSLVersions := [sslvSSLv23,sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2]
FIOHandlerOpenSSL.Mode := sslmClient;
FIOHandlerOpenSSL.VerifyMode := [];
FIOHandlerOpenSSL.VerifyDepth := 0;
asked Mar 14, 2016 at 12:23
TomTom
3,5659 gold badges69 silver badges122 bronze badges
10
EOF means the connection was closed unexpectedly, in this case during the handshake. You are enabling multiple SSLVersions, which means Indy will use SSLv23 internally to connect. That will only work if the server is using SSLv23 to listen, thus allowing the client and server to negotiate a compatible SSL/TLS version. If the server is using a specific SSL/TLS version instead of SSLv23, SSLv23 will not work on the client side. You would have to use the same specific SSL/TLS version on the client side to match.
answered Mar 14, 2016 at 16:02
Remy LebeauRemy Lebeau
536k30 gold badges444 silver badges750 bronze badges
9
Another cause of this problem can be a timeout.
After analysis it was finally identified the problem was due to a timeout in milliseconds, rather than seconds. Once fixed, the problem resolved itself.
answered Mar 5, 2020 at 5:29
Jeremy ThompsonJeremy Thompson
59.8k32 gold badges184 silver badges308 bronze badges
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Open
jfgreco opened this issue
May 2, 2018
· 2 comments
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…
|
0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
|
|
1 |
|
|
19.07.2016, 14:19. Показов 5452. Ответов 14
Драститя ребята, мне нужна помощь.
__________________
0 |
|
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
19.07.2016, 14:19 |
|
14 |
|
31 / 30 / 16 Регистрация: 08.07.2015 Сообщений: 137 |
|
|
20.07.2016, 17:50 |
2 |
|
Код в студию.
0 |
|
Nekich 0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
||||
|
20.07.2016, 21:59 [ТС] |
3 |
|||
Добавлено через 40 секунд
0 |
|
31 / 30 / 16 Регистрация: 08.07.2015 Сообщений: 137 |
|
|
21.07.2016, 00:04 |
4 |
|
Используй Synapse, там все проще.
0 |
|
Заблокирован |
|
|
21.07.2016, 13:56 |
5 |
|
У меня Ваш код работает совершенно корректно, никаких ошибок. Попробуйте обновить библиотеки libeay.dll и ssleay32.dll, а по возможности, и всю Indy. Скачивать отсюда: https://indy.fulgan.com Добавлено через 1 минуту
Используй Synapse, там все проще. Ни фига не проще. Редиректы нужно обрабатывать ручками, заголовки выставлять вручную, всё вручную.
0 |
|
0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
|
|
21.07.2016, 16:29 [ТС] |
6 |
|
AllFree, Поставил новые dll, выдает ошибку «Error connecting with SSL.
0 |
|
Заблокирован |
|
|
21.07.2016, 18:54 |
7 |
|
Не знаю, друг мой, не знаю. У меня те же параметры и версия Indy, но всё работает.
0 |
|
31 / 30 / 16 Регистрация: 08.07.2015 Сообщений: 137 |
|
|
21.07.2016, 20:07 |
8 |
|
В httpsend есть встроенный модуль для работы с редеректами.
0 |
|
0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
|
|
21.07.2016, 21:27 [ТС] |
9 |
|
AllFree, А скинь свой проект с dll
0 |
|
Заблокирован |
|
|
21.07.2016, 21:56 |
10 |
|
Пожалуйста.
1 |
|
0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
|
|
21.07.2016, 22:15 [ТС] |
11 |
|
AllFree, Хмм, пишет ошибку «Socket Error # 10054 Добавлено через 4 минуты
0 |
|
Заблокирован |
|
|
21.07.2016, 22:41 |
12 |
|
Дело вовсе не в делфях. Возможно, какие-то косяки с сетью.
0 |
|
0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
|
|
21.07.2016, 22:59 [ТС] |
13 |
|
AllFree, Брандмауэр отключал, я еще твою программу не запускал, потом запущу
0 |
|
Заблокирован |
|
|
21.07.2016, 23:01 |
14 |
|
потом запущу Ок, всё понятно.
0 |
|
0 / 0 / 0 Регистрация: 06.03.2016 Сообщений: 51 |
|
|
21.07.2016, 23:11 [ТС] |
15 |
|
AllFree, Запустил, вижу, спарсило страницу, эхх, жалко что у меня не работает Добавлено через 1 минуту Добавлено через 1 минуту Добавлено через 1 минуту
0 |
8 hours ago, david_navigator said:
If you mean the version numbers of libeay32.dll & ssleay32.dll, then they’re 1.0.1.3 (1.0.1c) — dated 27/01/2014 !!!
Yes, I do, and that is a VERY old version of OpenSSL, you need to upgrade. Indy currently supports up to 1.0.2u dated 21/12/2019, which you can find at https://github.com/IndySockets/OpenSSL-Binaries/ Work on supporting 1.1.x is in progress: https://github.com/IndySockets/Indy/pull/299
8 hours ago, david_navigator said:
SSLOptions.Method := sslvTLSv1;
The Method property is deprecated, you should be using the SSLVersions property instead.
TLS 1.0 has been (almost) completely phased out of modern servers. Most modern servers support, if not require, TLS 1.2, so that really should be your minimum going forward nowadays. You should also have TLS 1.1 enabled as a fallback, just in case, but even that is being phased out as well.
To enable multiple TLS versions with the Method property, you would have to set it to sslvSSLv23, which will set the SSLVersions property to all SSL/TLS versions supported by Indy (including SSL 2.0, SSL 3.0, and TLS 1.x), but it is better to use the SSLVersions property directly (ie, don’t enable SSL 2.0 and 3.0 anymore), eg:
SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2];
Having multiple TLS versions enabled at a time will allow OpenSSL to negotiate the highest version that both client and server support.
That being said, on a side note, you do not need to assign ANY of the following SSLIOHandler properties, as Indy handles them internally for you:
8 hours ago, david_navigator said:
with IdSSLIOHandlerSocketOpenSSL1 do begin ... Destination := format('%s:%s', [EditServerHost.text, EditPort.text]); // 'imap.gmail.com:993'; Host := EditServerHost.text; ... Port := strtoint(EditPort.text); DefaultPort := 0; ... end;
Setup the necessary Host/Port only in the client component, ie TIdIMAP4. The Connect() method will then copy them into the IOHandler as needed.
Edited October 22, 2021 by Remy Lebeau
I’m trying to get data from the website. https://exergy.skmenergy.comHere’s my building code and the component.
FHttp := TIdHTTP.Create(nil);
FSSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
FSSLIOHandler.MaxLineAction := maException;
FSSLIOHandler.SSLOptions.Method := sslvSSLv23;
FSSLIOHandler.SSLOptions.Mode := sslmUnassigned;
FSSLIOHandler.SSLOptions.SSLVersions := [sslvSSLv2, sslvSSLv3, sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2];
FCookie := TIdCookieManager.Create(nil);
with FHttp do
begin
IOHandler := FSSLIOHandler;
CookieManager := FCookie;
AllowCookies := True;
HandleRedirects := True;
Request.BasicAuthentication := True;
if StrToBoolDef(FParam.Items['ProxyUse'], True) = True then
begin
ProxyParams.ProxyPort := StrToInt(FParam.Items['Port']);
ProxyParams.ProxyServer := FParam.Items['Server'];
ProxyParams.ProxyUsername := FParam.Items['Login'];
ProxyParams.ProxyPassword := FParam.Items['ProxyPassword'];
end;
ReadTimeout := 100000000;
end;
But after the call.
FHTTP.Get('https://exergy.skmenergy.com);
I’m making a mistake.
Error connecting with ssl. eof was observed that violates the protocol.What am I doing wrong?
Files libeay32.dll and ssleay32.dll We’re close. Their versions are quite new.1.1.0.4) Versions Embarcadero® RAD Studio 10.2 Version 25.0.29039.2004
Разобрался такая ошибка возникает из-за путаницы сертификатов!
APN сертификат на сайте конечно надо заводить от девелопера, но это у меня и так было.
А вот в чем траблы были.
В связке ключей валялись сертификаты пушей моих экспериментов, но только по дате их отличишь.
Поэтому на всякий случай удалил ВСЕ сертификаты PUSH, тут же все еще на маке зашел в сафари
и скачал APN сертификат *.cer с сайта developer.apple.
Кликаем мышкой на этом сертификате и он отображается в связке ключей.
Затем находим ветку PUSH, открываем ее, ОБЕ строчки выделяем и сохраняем в MyPush.p12, пароль не нужен.
Далее уже на винде, утилитой ссл генерим pem файл
openssl pkcs12 -in MyPush.p12 -out MyPush.pem -nodes
жмем энтер и никаких паролей.
Далее в проекте делфи в SSLHandler заполняем что и гонсалес показал и cer и key указываем MyPush.pem.
Я потратил много времени на файлы и версии опенссл libeay32.dll и ssleay32.dll…но это НЕ ТО !!!
По прежнему все просто ложите в папку проекта эти файлы и не выносите мозг никому Wow64 или System32…или 0.9.8m,d,k? и т.п. бредом.
Давно, но успешно раньше использовал отправку почты после бэкапов. Сейчас возвращаюсь к ПО последней версии Cobian11 проверяю работу отправки через яндекс:
ОС Win10Corp, антивиря нет, брандмауэр добавил правила на входящие для портов 465/587 и просто пытался вырубить, cmd telnet клиент читает нормально smtp.yandex.ru 465/587.
указаны общие адрес отправителя, smtp.yandex.ru, 465/587, получатель, аутентификация логин/пароль.
Далее SSL, в нем думаю и проблема:
первый вариант при настройках поддерживает TLS, SSLv3, SSL, без подписи, использовать прокси-сервер:
Идёт проверка…
ERR Невозможно отправить журналы: Error connecting with SSL.
EOF was observed that violates the protocol
ERR Операция завершена с ошибками
второй вариант при настройках рекомендует TLS, SSLv3, авто,двусторонний, не исп прокси:
Идёт проверка…
Подключено к SMTP-серверу smtp.yandex.ru: 465
Отключено от SMTP-сервера
ERR Невозможно отправить журналы: Read timed out.
ERR Операция завершена с ошибками
Еще пробовал играться с различными комбинациями, так и не смог заставить работать.

