[fpc-devel] OpenSSL v1.1.x DLL loading / Bug 37137

Michael Van Canneyt michael at freepascal.org
Fri Sep 11 14:54:42 CEST 2020



On Fri, 11 Sep 2020, Wayne Sherman via fpc-devel wrote:

> On Tue, Jun 30, 2020 at 12:38 AM Michael Van Canneyt
> <michael at freepascal.org> wrote:
>>
>> On Tue, 30 Jun 2020, Wayne Sherman via fpc-devel wrote:
>>
>> > OpenSSL library loading fixes. Patch file is attached.  Comments are welcome.
>> >
>> > Summary:
>> >   1)  For Windows and OS2, remove DLLSSLNameX and DLLUtilNameX
>> > variables.  Instead use matched arrays of DLL filenames (SSL_DLL_Names
>> > and Crypto_DLL_Names)
>> >
>> >   2)  Due to refactoring, remove LoadLibHack or LoadLib functions.
>> >
>> >   3)  Remove LoadUtilLibrary function, UnloadSSLLib procedure, and
>> > UnloadUtilLib procedure since these were not being called internally
>> > and are unreachable externally.
>> >
>> >   4)  Add new function TryLoadLibPair which attempts to load a
>> > matched pair of DLLs (SSL and Crypto).  If either fails to load,
>> > UnloadLibraries is called to clean up.
>> >
>> >   5)  Refactored LoadLibraries to use arrays of names for Windows and
>> > OS2, and to use the new TryLoadLibPair helper function for all
>> > platforms.
>>
>> Thank you very much for the patch.
>> I will look at this ASAP.
>
> Hi Michael,
>
>  The OpenSSL library loading code still has the potential to load
> mismatched library versions.  Did you get a chance to review the patch
> I sent?

Not yet, I'm currently very busy.

The patch is invasive so I need some time to check this, 
meaning it will be for next weekend (not tomorrow, but next week).

Michael.


More information about the fpc-devel mailing list