Search code examples
delphiindy

Indy 9 with Delphi: How to enable TLS 1.0?


I cannot find docs or examples that show how to code up an http client to use TLS1.0 protocol as default, and only fall back to SSL v3 if the TLS connection fails.

Where to find?


Solution

  • Assign a TIdSSLIOHandlerSocket component to the TIdHTTP.IOHandler property, and then set the TIdSSLIOHandlerSocket.SSLOptions.Method property to sslvTLSv1 for TLS v1.0 specifically, or to sslvSSLv23 to let TIdHTTP and the server dynamically negotiate a compatible version during handshaking. Then have TIdHTTP request an HTTPS url.