There are several classes intended to be used with Indy network library. They let you add SSL/TLS support to your project. The classes are implemented as descendants of abstract TIdIOHandler class. The classes let you secure almost any Indy component, which provides support for I/O Handling, i.e. has IOHandler property (exceptions are Indy 9 classes which use explicit SSL mode).
There are different SSL/TLS classes for Indy 9 and Indy 10.
Both variants have one client class and two server classes.
Client class is attached to specified client object, for instance IdHTTP.
Server I/O Handler consists of two classes. One of them is a component that is put to the form. Only one instance of this class should be created for each server component (e.g., TIdHTTPServer). Its only purpose is to create instances of the second server class when they are required.
The objects of the second server class are created for every new incoming connection. It performs all the work actually.
To get SSL-connection with Indy you have to:
Create an instance of class for data encrypting, for example IdHTTP1 : TIdHTTP.
Create an instance of application-level protocol component, which data should be encrypted, for example IdIOHandler1 : TElIndySSLIOHandlerSocket.
Link them IdHTTP1.IOHanler := IdIOHandler1.
Configure HTTP and SSL settings using properties of IdHTTP1 and IdIOHandler1 objects.
Call IdHTTP1.Get(...) method. If IdHTTP1.IOHandler property points to TElIndySSLIOHandlerSocket object the HTTPS request will be performed. Otherwise (i.e. if IdHTTP1.IOHandler is not assigned) the unencrypted HTTP request will be sent to server.