非常奇怪,第一次api调用没问题, 第二次就会出现
Error creating SSL context:error:140A90F1:lib(20):func(169):reason(241)
简单查询好像是 SSL版本问题。偷懒不深究了,找到一个修改indy方法,记录一下。
直接修改 IdSSLOpenSSL 行3195,原文是 3156,可能与我的indy版本不同。
修改结果如下:
// create new SSL context
fContext := SSL_CTX_new(SSLMethod);
if fContext = nil then begin
OpenSSL_add_all_digests;
fContext := SSL_CTX_new(SSLMethod);
if fContext = nil then
EIdOSSLCreatingContextError.RaiseException(RSSSLCreatingContextError);
end;
//set SSL Versions we will use
原文地址:Indy 10 + OpenSSL: error:140A90F1:lib(20):func(169):reason(241)