Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   OpenSSL: IdOpenSSLSetLibPath funktioniert nicht (https://www.delphipraxis.net/201153-openssl-idopensslsetlibpath-funktioniert-nicht.html)

hoika 27. Jun 2019 10:10

OpenSSL: IdOpenSSLSetLibPath funktioniert nicht
 
Hallo,
ich sitze seit 4 Tagen (gefühlt 20 ... ;) ) an folgendem Problem.
Indy+SSL = Indy+OpenSSL.

Meine OpenSSL-Bibliotheken liegen nicht im Exe-Verzeichnis,
sondern in einem Verzeichnis darunter.
Ist ja nicht schlimm, es gibt ja IdOpenSSLSetLibPath.

Aber:
Wenn sich ein Programm installiert und sich selbst in die PATH-Variable einträgt, OK,
geht ja auch noch.
Nur: Wenn das Programm veraltetet OpenSSL-Bibliotheken mitbringt

-> Puff !!!

Scheinbar funktioniert LoadSSLCryptoLibrary und das dort befindliche SafeLoadLibrary nicht richtig.
Dort wird intern LoadLibrary mit dem Pfad der Dll aufgerufen.
Das scheint nicht mehr zu funktionieren ?


Weiss da jemand was darüber.


Das scheint hier in die Richtung zu gehen
https://stackoverflow.com/questions/...-with-no-error

mjustin 27. Jun 2019 10:38

AW: OpenSSL: IdOpenSSLSetLibPath funktioniert nicht
 
Als Workaround wird empfohlen die DLLs in das Anwendungsverzeichnis zu legen.

Zitat:

The best solution would be to put all the DLLs in the same directory as the application.
https://stackoverflow.com/a/13256146/80901

Die Ursache scheint zu sein, dass die erste SSL DLL eine Abhängigkeit von einer weiteren hat. Und dann gilt die System Suchreiehnfolge für DLLs:

Zitat:

When your application lives in a different folder from MyDll.dll, those dependencies will not be resolved from the folder that contains MyDll.dll. Instead they are resolved by the system DLL search order.


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz