Hi, I'm new here but came here out of frustration trying to find help with the TIdHTTP errors I'm getting.
I have the latest Delphi 11 and INDY version is 10.6.2.0.
I have been using the TIdHTTP component to communicate with the Betfair.com API and my programs continually poll the website to get the information I want. These programs have been working both locally and on VPS for years.
All of sudden I'm now getting these error messages randomly and fairly frequently:
1) Time out errors
2) Error connecting with SSL
error:1404F10B: SSL Routines SSL3_GET_RECORD : wrong version number
3) Error connecting with SSL
error: 14077410:SSLroutines SSL23_GET_SERVER_HELLO: sslv3 alert handshake failure
My programs using the TIdHTTP component have been working fine for years and all of a sudden these frequent error are occurring, causing a program crash.
My code:
I'm getting desperate for a solution, any help would be appreciated.
I have the latest Delphi 11 and INDY version is 10.6.2.0.
I have been using the TIdHTTP component to communicate with the Betfair.com API and my programs continually poll the website to get the information I want. These programs have been working both locally and on VPS for years.
All of sudden I'm now getting these error messages randomly and fairly frequently:
1) Time out errors
2) Error connecting with SSL
error:1404F10B: SSL Routines SSL3_GET_RECORD : wrong version number
3) Error connecting with SSL
error: 14077410:SSLroutines SSL23_GET_SERVER_HELLO: sslv3 alert handshake failure
My programs using the TIdHTTP component have been working fine for years and all of a sudden these frequent error are occurring, causing a program crash.
My code:
Code:
try
httpClient.Request.AcceptEncoding := 'gzip, deflate';
httpClient.Request.ContentType := 'application/json;';
httpClient.Request.Charset := 'utf-8';
httpClient.Request.ContentLength := sizeof(Params);
httpClient.Request.Connection := 'Keep-Alive';
httpClient.Request.Accept := 'application/json';
httpClient.ReadTimeout := 120000;
httpClient.ConnectTimeout := 120000;
// httpClient.HandleRedirects := true; { added friday 20230623 didn't solve problem}
httpClient.Request.CustomHeaders.Add('X-Authentication:' + SessionToken);
httpClient.Request.CustomHeaders.Add('X-Application:' + 'lgQDTaP9sJgCDTs8');
sslIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
sslIOHandler.PassThrough := false; { added friday 20230623} //https://quality.embarcadero.com/browse/RSP-29900 hasn't solved problem
sslIOHandler.SSLOptions.Method := sslvSSLv3;
sslIOHandler.SSLOptions.sslversions := [sslVTLSv1, sslVTLSv1_1,sslVTLSv1_2,sslvSSLv3];
// sslIOHandler.SSLOptions.Method := sslvSSLv3; // tried lots of versions of SSL none solved the problem
// sslIOHandler.SSLOptions.SSLVersions := [sslvSSLv3];
httpClient.IOHandler := sslIOHandler;
httpClient.Request.ContentLength := sizeof(Params);
httpClient.Post(self.URL, Params, HTTPstr);
except
I'm getting desperate for a solution, any help would be appreciated.