0

I try to use Delphi XE3 + Indy Control(TIdhttp) to connect to a https site, but the Get method raise an exception "Error connecting with SSL. Error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv 1 alert protocol version"

Below is my code:

var
  IOHandler: TIdSSLIOHandlerSocketOpenSSL;
begin
  IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);

  try
    IdHTTP1.IOHandler := IOHandler;
    IdHTTP1.Get(PostURL, Stream);
  finally
    IOHandler.Free;
  end;
  
end;
alancc
  • 487
  • 2
  • 24
  • 68
  • 3
    Did you see https://stackoverflow.com/questions/48984539/how-can-we-connect-with-a-website-getting-ssl-error-1409442e (which is the top Google search match for "Delphi Indy ")? – Andreas Rejbrand Oct 01 '20 at 06:27
  • 1
    Note that XE3 is very old, so if you are trying to use the Indy version that shipped with it then you will need to upgrade it to the latest Indy version in order to connect to websites that require the TLS 1.2 SNI extension. – Remy Lebeau Oct 01 '20 at 07:27

0 Answers0