Delphi Indy:无法第一次加载SSL库.重试有效

Lob*_*uno 4 delphi ssl indy

我正在使用最新的indy快照(昨天安装)和最新的SSL库.

当尝试使用idSMTP发送邮件时,组件第一次连接时,我得到一个例外:

无法加载SSL库

.有趣的是,重试总是有效.调试我发现问题出在IsSSLOpenSSLHeader,函数Loaad:boolean,line

@OpenSSL_add_all_algorithms := LoadFunctionCLib('OpenSSL_add_all_algorithms');
Run Code Online (Sandbox Code Playgroud)

为什么它第一次失败而不是第二次对我来说仍然是一个谜,但在我继续调查之前,我想好像有人知道这个问题的解决方案.

Rem*_*eau 5

您使用的代码不是最新的快照.几个星期前,这个错误被修复了.您引用的行不在最新的代码中,它已替换为以下内容:

fn_OPENSSL_add_all_algorithms_noconf = 'OPENSSL_add_all_algorithms_noconf';
fn_OpenSSL_add_all_algorithms = 'OpenSSL_add_all_algorithms';

@OpenSSL_add_all_algorithms := LoadOldCLib(fn_OpenSSL_add_all_algorithms, fn_OPENSSL_add_all_algorithms_noconf);
Run Code Online (Sandbox Code Playgroud)