EIdOSSLConnectError Error connecting with SSL - EOF was observed

核能气质少年 提交于 2019-11-28 05:40:32

问题


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 protocol

In 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;

回答1:


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.



来源:https://stackoverflow.com/questions/35987485/eidosslconnecterror-error-connecting-with-ssl-eof-was-observed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!