lNet SSL connection receive problem lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- mlody87 · 2017-01-24 09:54 Hi! I have a litle problem with my application. When I make client-server connection without SSL everything is ok. My client send to server request and receive answer. On server and clients log its look like this: Server Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ReceiveMsg: ClientId=128|Msg=Hello  Client Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ReceiveMsg: ServerMsg=Hello  But when I switch on ssl connection then on client side I receive some empty messages and logs looks like this: Client Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ReceiveMsg:ReceiveMsg:ReceiveMsg:ReceiveMsg:ReceiveMsg: ServerMsg=Hello  Do you know maybe why its happend? Thx! ---------------------------------------------------------------------- minesadorada · 2017-01-24 10:33 Are you in Windows?  If so you may need the openssl libs. Attached: a unit that will retrieve them: Just call function CheckForOpenSSL ---------------------------------------------------------------------- Thaddy · 2017-01-24 11:51 It can also be that you try to use a deprecated protocol, like sslv3/ tls1.0. In recent openssl these are disabled by default. If that is the case select tlsv1.2 (fallback to tls1.1 and then sslv2 is provided by openssl as standard for now) If you try to connect to an up-to-date host with sslv3 or tls1.0, that host will drop the connection. Also note the openssl headers in trunk have just been updated to reflect this. They also have been backported to 3.0.2.RC2 this weekend. ---------------------------------------------------------------------- Remy Lebeau · 2017-01-25 23:03 Quote from: mlody87 on January 24, 2017, 10:54:48 amDo you know maybe why its happend? Not without seeing your actual code.  You are likely not sending/reading the data correctly when SSL is enabled.  Please show an actual example. ---------------------------------------------------------------------- mlody87 · 2017-02-01 16:23 I use lNet components. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses   lNet, lNetSSL (..)     FCon := TLTCP.Create(nil); // create new TCP connection    FCon.OnError := @OnEr;     // assign all callbacks    FCon.OnAccept := @OnAc;    FCon.OnDisconnect := @OnDs;    FCon.OnAccept := @OnAc;    FCon.OnReceive:= @OnRe;    FCon.Timeout := 100;     FCon.ReuseAddress := True;    SSL:=TLSSLSession.Create(nil);   SSL.CAFile:='sec/cert.crt';   SSL.KeyFile:='sec/key.txt';   SSL.Method:=msSSLv2or3;    FCon.Session:=SSL; and when I send I do: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i FCon.SendMessage('Message', aSocket); Can be problem with this msSSLv2or3?