简体   繁体   English

Indy 10-IdSMTP.Connect,引发“无法加载SSL库”。

[英]Indy 10 - IdSMTP.Connect raising “Could not load SSL library.”

Here is my configuration: 这是我的配置:

IdSMTP1.Host := 'smtp.gmail.com';
IdSMTP1.Port := 587;
IdSMTP1.UseTLS := utUseExplicitTLS;
IdSMTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvTLSv1;

I've downloaded the OpenSSL from here , both libeay32.dll and ssleay32.dll are in the same folder of my application. 我已经从此处下载了OpenSSL, libeay32.dllssleay32.dll都位于我的应用程序的同一文件夹中。

The Indy version is: 10.0.52 Indy版本是:10.0.52

The following command is working on my machine: 以下命令正在我的机器上运行:

telnet smtp.gmail.com 587

How to properly connect in a TLS enable SMTP server, in my case Gmail, using Indy? 如何使用Indy在TLS启用SMTP服务器(例如Gmail)中正确连接?

It seems like IdSSLOpenSSLHeaders.Load could not find the address to the following procedures, among others: 似乎IdSSLOpenSSLHeaders.Load找不到以下过程的地址,其中包括:

  @IdSslSessionGetId := LoadIndyFunction(fn_SSL_SESSION_get_id);
  @IdSslSessionGetIdCtx := LoadIndyFunction(fn_SSL_SESSION_get_id_ctx);
  @IdSslCtxGetVersion := LoadIndyFunction(fn_SSL_CTX_get_version);
  @IdSslCtxSetOptions := LoadIndyFunction(fn_SSL_CTX_set_options);

  @iddes_set_odd_parity := LoadFunctionCLib(fn_des_set_odd_parity);
  @iddes_set_key := LoadFunctionCLib(fn_des_set_key);
  @iddes_ecb_encrypt := LoadFunctionCLib(fn_des_ecb_encrypt);

This is the message returned from WhichFailedToLoad : 这是从WhichFailedToLoad返回的消息:

 SSL_CTX_set_info_callback_indy 
 X509_STORE_CTX_get_app_data_indy 
 X509_get_notBefore_indy 
 X509_get_notAfter_indy 
 SSL_SESSION_get_id_indy 
 SSL_SESSION_get_id_ctx_indy 
 SSL_CTX_get_version_indy 
 SSL_CTX_set_options_indy 
 des_set_odd_parity 
 des_set_key des_ecb_encrypt

Here is a quote from the following discussion in the Embarcadero forums: 以下是Embarcadero论坛中以下讨论的引文:

OpenSSL Version to work with indy 10.0.52 适用于indy 10.0.52的OpenSSL版本

Indy 8, 9, and early 10 versions used custom-built OpenSSL DLLs because OpenSSL did not expose everything Indy needed access to, so Indy had to add a few custom functions to the DLLs. Indy 8、9和早期10版本使用了自定义的OpenSSL DLL,因为OpenSSL并未公开Indy需要访问的所有内容,因此Indy必须向DLL添加一些自定义功能。 Later Indy 10 versions switched to the official OpenSSL DLLs. 后来的Indy 10版本切换到了官方的OpenSSL DLL。

Indy's custom OpenSSL DLLs are no longer distributed anywhere (that I know of), but you can try this archived download: Indy的自定义OpenSSL DLL不再分布在任何地方(据我所知),但是您可以尝试以下存档下载:

http://web.archive.org/web/20071022121646/http://www.intelicom.si/www.nsf/2434100e396ad3f3c125705100369374/d6b8e150fe453facc1257082006fc8b9/$FILE/indy_openssl096g.zip http://web.archive.org/web/20071022121646/http://www.intelicom.si/www.nsf/2434100e396ad3f3c125705100369374/d6b8e150fe453facc1257082006fc8b9/$FILE/indy_openssl096g.zip

Some old Indy-specific OpenSSL DLLs are available in Fulgan's SSL Archive folder . Fulgan的SSL Archive文件夹中提供了一些特定于Indy的旧版OpenSSL DLL。

10.0.52 is an outdated release of Indy 10. There have been a lot of changes to Indy 10 since that release. 10.0.52是Indy 10的过时版本。自该版本以来,Indy 10进行了很多更改。 You really should upgrade to a modern Indy 10 release , and then you can use the latest OpenSSL DLLs that are available in Fulgan's SSL main folder . 您确实应该升级到现代的Indy 10版本 ,然后才能使用Fulgan的SSL主文件夹中提供的最新OpenSSL DLL。

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

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