Update on the use of the TLS1_3 protocol in Indy (NOT OFFICIAL FROM Indy Team).

This is an indication coming from the undersigned, who has carried out exactly what is described and verified that there are no problems either with the IDE or with the existing projects by recompiling and executing them.

Conditions:

- Rad Studio Athens 12.0 patch 1 (or Delphi);
- Dowloaded Last GitHub repository Indy source: https://github.com/IndySockets/Indy/archive/refs/tags/Indy-10.6.3.zip
- Donwloaded PR299 (aka NewOpenSSL_PR x OpenSSL 1.1.1): https://github.com/mezen/Indy/archive/refs/heads/NewOpenSSL_PR.zip

Now you need to uninstall Indy from Rad Studio IDE, components and binaries included. YOU DO NOT NEED TO DELETE THE ORIGINAL INDY SOURCES.   This is the official link explaining how update Indy:  https://github.com/IndySockets/Indy/wiki/Updating-Indy

ATTENTION:

Do not use THE AUTOMATIC PROCEDURE in the instructions indicated in the previous link. It deletes files that do not belong to the Indy environment.
You have to do what is indicated by hand, but when you get to the REMOVE THE FILES procedure, stop!!!!

Instead, perform these steps:

1) Using Windows Explorer, go to the RAD STUDIO installation BIN directory (normally "C:\Program Files (x86)\Embarcadero\Studio\23.0\bin") and delete the following files:     Then go to the BIN64 directory and delete the following files:     Now you need to go to the LIB directory and list all the ID* files of the subdirectories (use the pane at the top right of the explorer to search). I recommend listing the files by NAME.
The list includes a series of files (more than 10000) that will need to be deleted, BUT FROM THIS LIST YOU MUST UNSELECT (i.e. THE FILES SHOULD NOT BE DELETED) the following files:

- all files starting with "FMX", should be 16;
- all files starting with "Vcl", should be 8;
- all files starting with "play", should be 4;
- the "idoc.dcu" files should be 4;
- the "idispids.dcu" files should be 4;

The procedure indicated in the link (Update Indy) would have deleted these last 8 files.

Now that you have deleted the files you will need to open the IDE.

Errors will be generated:

- package "dclemsedge290.bpl" could not be loaded, ignore and select not to reload again.

- the "livepreview290.bpl" package, ignore and select not to reload again.

Other packages may give errors, this depends on the fact that you have components registered in the IDE and that use Indy. You can ignore them and allow them to be reloaded the next time you restart the IDE.

If you want to do a clean job, you should go to TOOL/OPTIONS/LANGUAGE/DELPHI/LIBRARY and from the "Browsing Path" item you will have to eliminate the Indy references (Core, System and Protocol) IN ALL PRESENT PLATFORMS.

Now Indy is no longer present in Delphi.

If you followed my initial instructions you should have downloaded the two zip files indicated.

Unzip the first one (Indy-10.6.3.zip) into a directory. This directory will be the one containing Indy and will be used for all your applications.

Now from the second ZIP file (NewOpenSSL_PR.zip) EXTRACT ONLY the OPENSSL directory found in "Indy/Lib/Protocols" and add it to the directory you created in the previous step, always under Lib/Protocols (so at the end there will be a directory plus, Lib/Protocols/OpenSSL).

You will now have Indy with TLS1_3 enabled and with usable OpenSSL 1.1.1 (and also partially OpenSSL 3.1.x).

Continue with the "Build and Install" paragraph of the link indicated initially.

After finishing, you need to add two paths to Delphi's LIBRARY PATH to follow the ones you entered as in the instructions:

"Lib\Protocols\OpenSSL"
"Lib\Protocols\OpenSSL\Dynamic"

You will now need to recompile (and reinstall) all of your IDE components that use Indy and your projects.

For now the TLS1_3 can only be configured in code (therefore in RUNTIME), not in DesignTime as the IDE components have not been updated.

All your projects however will remain perfectly functional and will use the old TLS1_2 standard and the old OPENSSL 1.0.2 DLLs until you modify the source to include the new standard.

It's late and I'm going to eat now...       UPDATE   A note for those who use Indy to develop 64 bit or mixed 32 bit and 64 bit (even if you already know this): after having compiled and installed the Indy components (therefore 32 bit), delete the dcu files from the directories (where you unzipped Indy). You can safely delete ALL *.dcu files. If you leave them, when you go to compile your 64 bit project it will give you an error because the "dcu" are 32 bit.
By deleting the dcu, you will force the recompilation (in your project) of the Indy libraries. Also remember that in the options of your project a valid path is indicated in the "Unit output directory", this will allow the compiler to generate all the dcu of the project within that directory.    
    • Like
    3