Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
826 views
in Technique[技术] by (71.8m points)

macos - EIdOSSLConnectError Error connecting with SSL - EOF was observed

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;
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...