#1 Re: mORMot 2 » The OpenSslInitialize function throws an EOpenSsl exception on Windows » 2025-03-19 23:40:37

I've discovered that calling `OpenSslInitialize` without parameters raises an exception, but providing just the filenames does not result in an exception. Loading `libssl` fails if no filename or a full path to the library is provided, whereas specifying only the filename succeeds.

It seems that in `TryLoadLibrary`, the `LibraryOpen` call fails for `libssl` when given a full path, but succeeds when given just the filename. The previous version from March 16 used the filename-only approach during one of the attempts, which is why it worked correctly.

#2 Re: mORMot 2 » The OpenSslInitialize function throws an EOpenSsl exception on Windows » 2025-03-19 22:05:57

I've downloaded the libraries from https://slproweb.com/products/Win32OpenSSL.html. Currently, I have three DLLs in the application's exe directory: `legacy.dll`, `libcrypto-3.dll`, and `libssl-3.dll`, all version 3.4.1.0 from 2025-02-11. However, the same exception still occurs.

I haven't set any explicit paths in mormot2 to these OpenSSL libraries—maybe that's necessary, but I'm not sure how to configure it. As mentioned previously, the version from March 16 works flawlessly without any issue loading OpenSSL.

Local vars before call to libcrypto.TryLoadLibrary:
https://app.screencast.com/4WRROitn1aini

Local vars right before call to libssl.TryLoadLibrary and the exception:
https://app.screencast.com/1CADtvIP3nGnm

Exception:
https://app.screencast.com/rm3J0sI03uart

Call stack in TryLoadLibrary:
https://app.screencast.com/pFABmtdlodMAQ

What else can i provide?

#3 mORMot 2 » The OpenSslInitialize function throws an EOpenSsl exception on Windows » 2025-03-19 20:12:28

Sebam
Replies: 4

In the current version of mormot2, the OpenSslInitialize function throws an EOpenSsl exception at line 5899 when attempting to load libssl-3.dll. The issue does not occur in the version from March 16.
I'm using Delphi 12.3 with the latest openssl version 3.4.1, downloaded from https://wiki.overbyte.eu/wiki/index.php/ICS_Download. The error appears in both 32-bit and 64-bit builds.

ThreadId=20380
ProcessId=1
ThreadName="Main"
ExceptionMessage="TLibSsl.TryLoadLibray failed - searched in C:\dev\tm\libssl-3.dll [LoadLibrary error [ERROR_PROC_NOT_FOUND] (0x7F)]"
ExceptionName="EOpenSsl"
ExceptionDisplayName="EOpenSsl"
ExceptionAddress=76E7D4F2
FileName=<not available>
LineNumber=<not available>
ExceptionObject=46FBCCF8
Classes=[EOpenSsl,ExceptionWithProps,Exception,TObject]

#4 Re: mORMot 2 » mormot.ui.pdf.pas doesn't compile in the current version » 2025-03-17 11:32:40

Thanks a lot for fixing the issue—I really appreciate your quick help! Everything compiles perfectly now.

Also, big thumbs up for the awesome work on the mORMot2 library—it’s a fantastic tool and a pleasure to work with!

#5 mORMot 2 » mormot.ui.pdf.pas doesn't compile in the current version » 2025-03-17 00:18:26

Sebam
Replies: 2

The function TPdfDocument.CreateFileAttachmentFromBuffer in unit mormot.ui.pdf.pas doesn't compile in the current version. On line 7875:

mime := GetMimeContentType(pointer(Buffer), length(Buffer), Description);

there's a compilation error:

[dcc32 Error] mormot.ui.pdf.pas(7875): E2010 Incompatible types: 'RawByteString' and 'Pointer'

Same error on line 7877.

#6 mORMot 2 » TSynLogFamily.GetExistingLog issue » 2023-03-01 00:27:42

Sebam
Replies: 1

Hello
I have problem with TSynLogFamily.GetExistingLog.
It can return log text only when written with TFileStream, but TSynLog.CreateLogWriter creates TFileStreamEx for that purpose. TFileStreamEx does not inherit form TFileStream and GetExistingLog returns nothing.
Is it a bug or i don't know how to configure logging in mormot2?

Board footer

Powered by FluxBB