[END, OPEN A NEW TOPIC] It comes back again... lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- senglit · 2020-06-21 16:37 Hi, all I got this problem with lNet when I use Lazarus 2.0.6 FPC 3.0.4.  I searched the forum and found it happened because lNet 0.6.6 got a SSL version problem and the trick is to do InitSSLInterface in openssl.pas.  https://forum.lazarus.freepascal.org/index.php/topic,46527.0.html Today, I updated my software: 0. uninstalled old version lazarus 1. installed Lazarus 2.0.8 + FPC 3.0.4 2. downloaded FPC 3.2.0 (exe installation file for win32, together with win32-cross-win64.exe) and installed them in c:/fpc. 3. downloaded FPC 3.2.0 source files, and upziped them in c:/fpc/3.2.0/source 4. change the Lazarus config from the IDE menu "tools-options", point the compiler and source to FPC 3.2.0 (I left the "Make" point to fpc 3.0.4, I guess it is used only to rebuild Lazarus IDE) 4. re-install lNet 0.6.6 Then, I got this error again with my program: "Unable to initialize OpenSSL library, please check your OpenSSL installation" I tried the old way to solve this problem, but this time I can't solve it. What I tried include: 1. add InitSSLInterface into openssl.pas in fpc 3.2.0  and copy it into lNet/lib 2. add InitSSLInterface into openssl.pas in fpc 3.0.4(I'm affraid I my redirection of fpc version did not work) 3. try tz's openssl.pp, add InitSSLInterface and copy it into lNet/lib But the error is still there. Maybe I missed something? ---------------------------------------------------------------------- TRon · 2020-06-21 18:23 Quote from: senglit on June 21, 2020, 06:37:16 pmMaybe I missed something? I do not have experience with lnet but, the only thing obviously missing from your post (perhaps that is why you did not mention it in there) is that you have actually installed the openssl libs and they can be found by your app ? ---------------------------------------------------------------------- TRon · 2020-06-21 20:40 fwiw i just downloaded the lnet sources from github, put those into a unit directory that the compiler is able to find and compiled the fpget console example with fpc 3.2. Code: [Select]./fpget https://www.google.com Host: www.google.com URI: / Port: 443 Response: 200 OK, data...377...1397...1397...1397...1397...1397...1397 ...1397...1397...1397...1397...1397...1397...1397...1397...1397...1397 ...761...1391...1397...1397...1397...1397...1397...1397...1397...1397. ..1397...1397...1397...1397...1397...1397...1397...1397...1306...done. Disconnected. Heap dump by heaptrc unit of /projects/lnet/lhttp/fpget 493 memory blocks allocated : 123293/125008 492 memory blocks freed     : 123237/124952 1 unfreed memory blocks : 56 True heap size : 163840 True free heap : 163680 Should be : 163688 Call trace for block $76DB4080 size 56   $00085144  TLHTTPCLIENTSOCKET__CREATE,  line 2057 of /lnet/lhttp.pp   $0007E288  TLTCP__CONNECT,  line 1378 of /lnet/lnet.pp   $000861F8  TLHTTPCLIENT__SENDREQUEST,  line 2332 of /lnet/lhttp.pp   $00010E4C  main,  line 117 of fpget.pp So minus the memory leak, everything seems to work as intended with lnet. Where do you get the lnet package from, OPM ? edit: I figured out you did get it from OPM as the package from OPM is outdated. I'm not going to burn myself on that topic again so, you would have to raise an issue about that yourself. ---------------------------------------------------------------------- senglit · 2020-06-22 03:54 Quote from: TRon on June 21, 2020, 08:23:19 pmQuote from: senglit on June 21, 2020, 06:37:16 pmMaybe I missed something? I do not have experience with lnet but, the only thing obviously missing from your post (perhaps that is why you did not mention it in there) is that you have actually installed the openssl libs and they can be found by your app ? I have openssl in my system. And my program worked well before I did this upgrade. So I think it is the lNet version problem. ---------------------------------------------------------------------- senglit · 2020-06-22 04:11 Quote from: TRon on June 21, 2020, 10:40:05 pmSo minus the memory leak, everything seems to work as intended with lnet. Where do you get the lnet package from, OPM ? edit: I figured out you did get it from OPM as the package from OPM is outdated. I'm not going to burn myself on that topic again so, you would have to raise an issue about that yourself. Following your instruction, I downloaded lNet from https://github.com/almindor/lnet and installed it. I got that error again. Then I used tz's openssl.pp patch. But the error was still there. hmm.... I'm stucked ---------------------------------------------------------------------- senglit · 2020-06-22 04:25 ps: I installed Win64 OpenSSL v1.1.1g Light which was downloaded from  http://slproweb.com/products/Win32OpenSSL.html ---------------------------------------------------------------------- senglit · 2020-06-22 04:45 Quote from: senglit on June 22, 2020, 06:25:03 amps: I installed Win64 OpenSSL v1.1.1g Light which was downloaded from  http://slproweb.com/products/Win32OpenSSL.html After I posted this message, I realized I can do a test if lNet works well with my OpenSSL. I made a simple c/s program, use lnet and ssl(msSSLv2or3, not TLC) in both side, so it would work if my openssl is ok. But it did not! Then I guess maybe lNet does not support OpenSSL v1.1.1, and I installed Win64 OpenSSL v1.0.2u Light. But it still did not work. So, I think the question has changed to: how to make lNet load openssl crectly? ---------------------------------------------------------------------- Handoko · 2020-06-22 05:17 I remember there were some similar discussions not long ago, it happened on Linux. The cause of the issues was the incompatible version of OpenSSL. The solution was to use the trunk. Maybe you can try the trunk or search the forum for more information.