简体   繁体   English

Linux下Delphi Indy10需要SSL库吗?

[英]Delphi Indy10 required SSL libraries under Linux?

Using Delphy 10.4: I am trying to start a IdTCPServer with IdServerIOHandlerSSLOpenSSL.使用 Delphy 10.4:我正在尝试使用 IdServerIOHandlerSSLOpenSSL 启动 IdTCPServer。 Under Linux, I get a "EIdOSSLCouldNotLoadSSLLibrary; Could not load SSL library."在 Linux 下,我得到一个“EIdOSSLCouldNotLoadSSLLibrary;无法加载 SSL 库”。 Under Windows, this works fine.在 Windows 下,这可以正常工作。

In the SSL directory, I now have both the Windows DLL's, and the .so files which I generated by compiling the "openssl-1.1.1j" .在 SSL 目录中,我现在拥有 Windows DLL 和我通过编译 "openssl-1.1.1j" 生成的 .so 文件。

So the SSL directory contains libeay32.dll, ssleay32.dll, libcrypto.so, libssl.so.所以SSL目录包含libeay32.dll、ssleay32.dll、libcrypto.so、libssl.so。

Why does it not accept it under Linux?为什么它在Linux下不接受?

First, you can't use Windows DLLs on Linux.首先,您不能在 Linux 上使用 Windows DLL。 You need Linux binaries, and on Linux TIdSSLIOHandlerSocketOpenSSL will be looking for libssl.so.xxx[l] and libcrypto.so.xxx[l] (where xxx is the version 1.0.2 or lower, and [l] is an optional letter a..z , or libssl.so / libcrypto.so symlinks that map to such versions).您需要 Linux 二进制文件,并且在 Linux 上TIdSSLIOHandlerSocketOpenSSL将查找libssl.so.xxx[l]libcrypto.so.xxx[l] (其中xxx1.0.2或更低版本, [l]是可选字母a..zlibssl.so / libcrypto.so符号链接映射到此类版本)。

Second, TIdSSLIOHandlerSocketOpenSSL , and by extension TIdServerIOHandlerSSLOpenSSL , does not support OpenSSL 1.1.x , only OpenSSL 1.0.2 and earlier, as you can see above.其次, TIdSSLIOHandlerSocketOpenSSL以及扩展TIdServerIOHandlerSSLOpenSSL不支持 OpenSSL 1.1.x ,仅支持OpenSSL 1.0.2 及更早版本,如上所示。

To use OpenSSL 1.1.x, you need to use a different IOHandler .要使用 OpenSSL 1.1.x,您需要使用不同的IOHandler One is currently in a pull request awaiting review, and so has not been merged into Indy's main code yet, but you can try it and see if it works for you:一个目前正在等待审查的拉取请求中,因此尚未合并到 Indy 的主要代码中,但您可以尝试一下,看看它是否适合您:

#299 Added new OpenSSL IO Handler for OpenSSL 1.1.1 #299 为 OpenSSL 1.1.1 添加了新的 OpenSSL IO 处理程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM