Recent

Author Topic: InitSSLInterface and OpenSSL problem  (Read 1236 times)

lazzaro2023

  • New Member
  • *
  • Posts: 26
InitSSLInterface and OpenSSL problem
« on: November 19, 2023, 05:50:51 pm »
Hello everyone, I kindly need your assistance:
I am encountering an issue while using fphttpclient, opensslsockets, fpopenssl, and openssl, specifically with

InitSSLInterface

For my PC (specifically Windows 10) to function properly when making an internet call, could you please inform me which .dll files are required and in which folder I should include them to avoid the error message: "Could not Initialize Openssl Library"

Thank you in advance

domasz

  • Sr. Member
  • ****
  • Posts: 433

lazzaro2023

  • New Member
  • *
  • Posts: 26
Re: InitSSLInterface and OpenSSL problem
« Reply #2 on: November 19, 2023, 06:14:16 pm »
https://forum.lazarus.freepascal.org/index.php?topic=41401.0

I have read the thread in question and downloaded the indicated files. Subsequently, I uploaded them to the folder of my program, however the error persists. I wonder if there is another solution…

domasz

  • Sr. Member
  • ****
  • Posts: 433
Re: InitSSLInterface and OpenSSL problem
« Reply #3 on: November 19, 2023, 06:20:24 pm »
Are the DLLs files in the same folder as your program's EXE?
Are they the same bitness as your program (64 bit or 32 bit)?

lazzaro2023

  • New Member
  • *
  • Posts: 26
Re: InitSSLInterface and OpenSSL problem
« Reply #4 on: November 19, 2023, 06:44:42 pm »
Given that I have Windows 10, I downloaded the version openssl-1.0.2q-x64_86-win64, which contains the following files:

11/22/2018 04:53 PM 2,318 HashInfo.txt
11/22/2018 04:53 PM 2,281,984 libeay32.dll
08/31/2016 12:14 PM 6,404 OpenSSL License.txt
11/22/2018 04:53 PM 548,352 openssl.exe
11/22/2018 04:53 PM 2,722 ReadMe.txt
11/22/2018 04:53 PM 386,560 ssleay32.dll

I have downloaded all the versions and the files are always the same. Does the 32 in the name of the dll file indicate that it is 32-bit? Also, are the only files I need to add to the folder where I have the program just the dll files?"

I use Lazarus 2.2.6 and fpc 3.2.2

domasz

  • Sr. Member
  • ****
  • Posts: 433
Re: InitSSLInterface and OpenSSL problem
« Reply #5 on: November 19, 2023, 09:21:34 pm »
If you could prepare a small demo showing the problem then it would be easier to fix it.

lazzaro2023

  • New Member
  • *
  • Posts: 26
Re: InitSSLInterface and OpenSSL problem
« Reply #6 on: November 19, 2023, 09:45:56 pm »
If you could prepare a small demo showing the problem then it would be easier to fix it.

Attached is the simple demo as you have requested.

dseligo

  • Hero Member
  • *****
  • Posts: 1219
Re: InitSSLInterface and OpenSSL problem
« Reply #7 on: November 19, 2023, 11:43:52 pm »
Your demo project works out of the box here (W11, Lazarus 2.2.6, FPC 3.2.2) - I attached screenshot.
You probably have wrong SSL libraries or you put them in the wrong place.

dseligo

  • Hero Member
  • *****
  • Posts: 1219
Re: InitSSLInterface and OpenSSL problem
« Reply #8 on: November 19, 2023, 11:51:49 pm »
Does the 32 in the name of the dll file indicate that it is 32-bit?

No.

Quote
Also, are the only files I need to add to the folder where I have the program just the dll files?"

Yes.

Are you sure your compiled program is 64-bit?

lazzaro2023

  • New Member
  • *
  • Posts: 26
Re: InitSSLInterface and OpenSSL problem
« Reply #9 on: November 21, 2023, 06:44:06 pm »
Your demo project works out of the box here (W11, Lazarus 2.2.6, FPC 3.2.2) - I attached screenshot.
You probably have wrong SSL libraries or you put them in the wrong place.


Thank you, it works!!! However, if I launch Windows Sandbox and put the 2 dlls and the .exe in a folder, it doesn’t work. Why?

 

TinyPortal © 2005-2018