Recent

Author Topic: TaurusTLS 1.0.0.25 beta 25 has been released  (Read 1255 times)

J. Peter Mugaas

  • Newbie
  • Posts: 6
TaurusTLS 1.0.0.25 beta 25 has been released
« on: June 23, 2025, 05:26:43 am »
I am pleased to announce that I have released an Indy (Internet Direct) add in called TaurusTLS.

This add provides Indy with the ability to use recent versions of OpenSSL such as OpenSSL 3.5.0.  Just use the IOHandlers provided by TaurusTLS instead of the OpenSSL IOHandlers provided by Indy.  There is a .CHM Help file reference that provides information on the properties, components, methods, and events that TaurusTLS provides.

You can download the latest beta at:

https://github.com/JPeterMugaas/TaurusTLS/releases/tag/1.0.0.25beta25

Handoko

  • Hero Member
  • *****
  • Posts: 5513
  • My goal: build my own game engine using Lazarus
Re: TaurusTLS 1.0.0.25 beta 25 has been released
« Reply #1 on: June 23, 2025, 06:38:14 pm »
I had issue with OpenSSL. Bookmarked, will study it later.
Thank you for sharing it.

EkkehardDomning

  • New member
  • *
  • Posts: 9
Re: TaurusTLS 1.0.0.25 beta 25 has been released
« Reply #2 on: December 12, 2025, 08:37:05 pm »
Hello,
I was able to use the mentioned components to connect to a POP3 and an IMAP Server with the current version of OpenSSL (3.5 and 3.6). The code fragments below does the job. It runs with Windows and Linux.
The Packages indylaz, TaurusTLSRT, TaurusTLSDsgn needs to be added to the project.
The method procedure TForm1.OnSSLNegotiated(ASender: TTaurusTLSIOHandlerSocket); is optional.
The parameters
    SSLIO.SSLOptions.MinTLSVersion := TLSv1_2;
    SSLIO.SSLOptions.SecurityLevel := 1;
are set to fit to my server(s) need, others may fit better to yours.
With the default SecurityLevel (2), I runned into an "error:0A00018A:SSL routines::dh key too small." after the call to SSL_connect() in procedure TTaurusTLSSocket.Connect in the unit TaurusTLS. 

Greetings Ekkehard


Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes, SysUtils, Forms, Controls, StdCtrls,
  3.   IdPOP3, IdIMAP4, IdExplicitTLSClientServerBase,
  4.   TaurusTLS;
  5.  
  6. type
  7.  
  8.   { TForm1 }
  9.  
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     Button2: TButton;
  13.     Memo1: TMemo;
  14.     procedure Button1Click(Sender: TObject);
  15.     procedure Button2Click(Sender: TObject);
  16.   private
  17.     procedure OnSSLNegotiated(ASender: TTaurusTLSIOHandlerSocket);
  18.   public
  19.   end;    
  20.  
  21. (...)  
  22.  
  23. procedure TForm1.OnSSLNegotiated(ASender: TTaurusTLSIOHandlerSocket);
  24. var
  25.   s: String;
  26. begin
  27.   if not Assigned(ASender.SSLSocket) then Exit;
  28.   s := ASender.SSLSocket.SSLProtocolVersionStr;
  29.   if s <> '' then
  30.     Memo1.Lines.Add('TLS Version: ' + s);
  31.   if not Assigned(ASender.SSLSocket.Cipher) then Exit;
  32.   s := ASender.SSLSocket.Cipher.Name;
  33.   if s <> '' then
  34.     Memo1.Lines.Add('Cipher Name: ' + s);
  35.   s := ASender.SSLSocket.Cipher.Description;
  36.   if s <> '' then
  37.     Memo1.Lines.Add('Cipher Description: ' + Trim(s));
  38.   s := ASender.SSLSocket.Cipher.Version;
  39.   if s <> '' then
  40.     Memo1.Lines.Add('Cipher Version: ' + s);
  41.   if ASender.SSLSocket.Cipher.Bits > 0 then
  42.     Memo1.Lines.Add('Cipher Bits: ' + IntToStr(ASender.SSLSocket.Cipher.Bits));
  43. end;
  44.  
  45. procedure TForm1.Button1Click(Sender: TObject);
  46. var
  47.   IMAP : TIdIMAP4 = Nil;
  48.   SSLIO : TTaurusTLSIOHandlerSocket;
  49.   sl : TStringList;
  50.   b : Boolean;
  51. begin
  52.   try
  53.     IMAP := TIdIMAP4.Create(nil);
  54.  
  55.     SSLIO := TTaurusTLSIOHandlerSocket.Create(nil);
  56.     SSLIO.OnSSLNegotiated := @OnSSLNegotiated;
  57.     SSLIO.SSLOptions.MinTLSVersion := TLSv1_2;
  58.     SSLIO.SSLOptions.SecurityLevel := 1;
  59.  
  60.     IMAP.IOHandler := SSLIO;
  61.     IMAP.UseTLS := utUseImplicitTLS;
  62.     IMAP.Port := 993;
  63.     IMAP.Username := 'user';
  64.     IMAP.Password := 'pass';
  65.     IMAP.Host := 'mail.server.your.choice';
  66.  
  67.     IMAP.Connect;
  68.     try
  69.       sl := TStringList.Create;
  70.       try
  71.         b := IMAP.ListMailBoxes(sl);
  72.         if b then
  73.         begin
  74.           Memo1.Lines.Add('Folders:');
  75.           Memo1.Lines.AddStrings(sl);
  76.         end
  77.         else
  78.           Memo1.Lines.Add('Failed to list folders');
  79.       finally
  80.         sl.Free;
  81.       end;
  82.     finally
  83.       IMAP.Disconnect;
  84.     end;
  85.   finally
  86.     if Assigned(SSLIO) then
  87.       SSLIO.Free;
  88.     if Assigned(IMAP) then
  89.       IMAP.Free;
  90.   end;
  91. end;
  92.  
  93. procedure TForm1.Button2Click(Sender: TObject);
  94. var
  95.   POP : TIdPOP3 = Nil;
  96.   SSLIO : TTaurusTLSIOHandlerSocket;
  97.   msgcnt : Integer;
  98. begin
  99.   try
  100.     POP := TIdPOP3.Create(nil);
  101.  
  102.     SSLIO := TTaurusTLSIOHandlerSocket.Create(nil);
  103.     SSLIO.OnSSLNegotiated := @OnSSLNegotiated;
  104.     SSLIO.SSLOptions.MinTLSVersion := TLSv1_2;
  105.     SSLIO.SSLOptions.SecurityLevel := 1;
  106.  
  107.     POP.IOHandler := SSLIO;
  108.  
  109.     POP.UseTLS := utUseImplicitTLS;
  110.     Pop.Port := 995;
  111.     POP.Username := 'user';
  112.     POP.Password := 'pass';
  113.     POP.Host := 'mail.server.your.choice';
  114.     POP.Connect;
  115.     try
  116.       msgcnt := POP.CheckMessages;
  117.       Memo1.Lines.Add('Messages in Box: %d',[msgcnt]);
  118.     finally
  119.       POP.Disconnect;
  120.     end;
  121.   finally
  122.     if Assigned(SSLIO) then
  123.       SSLIO.Free;
  124.     if Assigned(POP) then
  125.       POP.Free;
  126.   end;
  127. end;
  128.  

LeP

  • Jr. Member
  • **
  • Posts: 95
Re: TaurusTLS 1.0.0.25 beta 25 has been released
« Reply #3 on: December 12, 2025, 09:21:31 pm »
The parameters
    ..............
    SSLIO.SSLOptions.SecurityLevel := 1;
are set to fit to my server(s) need, others may fit better to yours.
With the default SecurityLevel (2), I runned into an "error:0A00018A:SSL routines::dh key too small." after the call to SSL_connect() in procedure TTaurusTLSSocket.Connect in the unit TaurusTLS. 
.............

Refer this for SecurityLevel learn: https://docs.openssl.org/3.0/man3/SSL_CTX_set_security_level/#default-callback-behaviour

And this is a discussion about TaurusTLS property: https://github.com/TaurusTLS-Developers/TaurusTLS/issues/165

 

TinyPortal © 2005-2018