Error connecting with SSL

Viewed 9623

I'm trying to connecto to this url, just using a get request. Goberment page But always get the error EIdOSSLConnectError "Error connecting with SSL"

The code I use, is this, it works with other pages, but not this one

IdHTTP1.HandleRedirects := true;
IdHTTP1.AllowCookies := true;
IdHTTP1.IOHandler := TIdSSLIOHandlerSocket.Create(IdHTTP1);
IdHTTP1.CookieManager := TIdCookieManager.Create(IdHTTP1);
with TIdSSLIOHandlerSocket(IdHTTP1.IOHandler) do begin
  SSLOptions.Method := sslvTLSv1;
  SSLOptions.Mode := sslmUnassigned;
  SSLOptions.VerifyMode := [];
  SSLOptions.VerifyDepth := 0;
  PassThrough := True;
end;
IdHttp1.Request.UserAgent := 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0';
IdHTTP1.RedirectMaximum := 30;
sHtml := IdHTTP1.Get('https://loginc.mat.sat.gob.mx/nidp/app/login?id=XACCertiSAT&sid=0&option=credential&sid=0');//<----Error here

Delphi 7, Indy 9.00.10

Thanks for any advice

1 Answers
Related