*Bug Reference:*
"OpenSSL v1.1.1 could not loaded on Windows platform"
https://bugs.freepascal.org/view.php?id=37137

1) I can confirm that the new v1.1.x DLL names are correct.  I also checked
some of the builds linked from the OpenSSL binary's page.  The OpenSSL
commit that discusses the name changes:
https://github.com/openssl/openssl/commit/520f434b42c83d63d8777075eb66967618551d5b

2) There is a problem with the loading.  The DLLs names have to be handled
in pairs.  If the first DLL fails to load (crypto/util DLL), then both
should be skipped and the next pair tried.  If the second DLL (SSL lib)
fails to load, the first one needs to be unloaded and the pair skipped to
try the next pair.  Otherwise it is possible to load two DLLs that are not
matched versions.

Reference master branch code:
https://github.com/graemeg/freepascal/blob/master/packages/openssl/src/openssl.pas#L5634

3) I recommend the newest libraries be tried first, working backwards
towards the oldest.

Both #2 and #3 are demonstrated by this patch on the synapse mailing list:
https://sourceforge.net/p/synalist/mailman/message/36933840/

<https://github.com/graemeg/freepascal/blob/master/packages/openssl/src/openssl.pas#L5634>
4) The bug report says "Fixed in Version: 3.2.0", but that appears to be
incorrect.

Thanks,

Wayne
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to