Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/18/23 in all areas

  1. The FIdSSLIOHandler.PassThrough property is True by default, so the connection is treated as a plain TCP connection. You need to set the PassThrough property to False to initialize the TLS handshake. So, that is why you are getting the error on your 1st Send(). Your application data is the 1st thing being transmitted, so the server is mistaking that as the TLS handshake, hence the error. You can set the PassThrough to False either before calling Connect() (ie, for implicit TLS, sending the handshake as soon as the TCP connection is established) or afterwards (ie, for explicit TLS, to allow for a protocol-level STARTTLS-style command before sending the handshake): procedure myFoo; var FIdTCPClient : TIdTCPClient; FIdSSLIOHandler : TIdSSLIOHandlerSocketOpenSSL; begin FIdTCPClient := TIdTCPClient.Create; FIdTCPClient.Host := '10.10.10.10'; FIdTCPClient.Port := 10007; FIdSSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create; FIdSSLIOHandler.SSLOptions.Mode := sslmClient; FIdSSLIOHandler.SSLOptions.VerifyMode := []; FIdSSLIOHandler.SSLOptions.VerifyDepth := 0; FIdSSLIOHandler.SSLOptions.SSLVersions := [sslvTLSv1_2]; FIdTCPClient.IOHandler := FIdSSLIOHandler; FIdSSLIOHandler.PassThrough := False; // <-- either here FIdTCPClient.Connect; // <-- will send the handshake if PassThrough is False FIdSSLIOHandler.PassThrough := False; // <-- or here, optionally after sending a STARTTLS command FIdTCPClient.Send([0,1,2,3]); end; That is because you are explicitly setting Sock.SslEnable to True and then calling Sock.StartSslHandshake() after calling Sock.Connect(). You are not doing the equivalent with Indy. No, it is a bug in your code. You are telling ICS to initiate the TLS handshake, but you are not telling Indy to do the same. This is not a new issue in 11.3. This is how Indy has always behaved. Yes - the PassThrough property. OpenSSL DLLs that are known to work with Indy are available in Indy's GitHub repo: https://github.com/IndySockets/OpenSSL-Binaries
  2. Ian Branch

    Class "abcdef" not found. error??

    I FOUND IT!!! For whatever reason I had the following order at the start of the unit.. type .... .... private .... .... const .... .... public .... .... end; Something in me said this didn't look/feel right so I changed it to type .... .... private .... ... public .... .... end; const .... .... and all is fine now. Exactly why I had the const in the private section, I can only specualte that I was trying to make the consts private...... FWIW, this is the const declaration.. const sNoSvcEmail : string = 'There is no Service Email Address recorded in the Company data!'; sNoCorpEmail : string = 'There is no Corporate Email Address recorded in the Company data!'; sPrintMsg : string = 'The Job Ticket not in the correct status for this print function!'; // The following are for IndexOrd. aIndexOrd : array of string = ['Job #', 'Customer Ref.', 'Job Status', 'Account Code', 'Job Type', 'MSN', 'ESN', 'User ID', 'Account #', 'Customer #', 'Service #']; aSortOrder : array of string = ['JobNo', 'CustomerRef', 'JobStatus', 'AccountCode', 'JobType', 'MSN', 'ESN', 'UserID', 'AccountNo', 'CustomerNo', 'ServiceNo']; Anyway, all good now, I can add components again to my hearts content. Thank you all for your interest and suggestions/contributions. Very much appreciated. Regards, Ian
  3. Lajos Juhász

    IBX & FireDAC, Change Views

    You can start from the help: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Data_Change_Notifications_(FireDAC)#:~:text=The Data Change Notifications feature,database client about these changes. For more information of how to configure the the Change Views feature, you can find a demo project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and navigate to Object Pascal\Database\FireDAC\Samples\DBMS Specific\InterBase\ChangeView\Generic
×