我执行此代码并收到错误:无法加载SSL lib 分类:EIdOSSLCouldNotLoadSSLLibrary 我不使用.net. var Client: TIdHTTP; tokenURL: String;begin client := TIdHTTP.Create(nil); try client.IOHandler := TIdSSLIOHandlerSocketOpenSSL
分类:EIdOSSLCouldNotLoadSSLLibrary
我不使用.net.
var Client: TIdHTTP; tokenURL: String; begin client := TIdHTTP.Create(nil); try client.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(client); TIdSSLIOHandlerSocketOpenSSL(client.IOHandler).SSLOptions.Method := sslvSSLv23; client.HandleRedirects := False; client.Get('https://www.xxxxx.xx/portal/ILlogin?username=XXXXXX&password=XXXXXXXX&skin=yyyyyyyyyy&portal=GG', [300, 301, 302, 303, 305, 306, 307]); if client.Response.Location <> '' then tokenURL := client.Response.Location; finally client.Free; end; end;IdSSLOpenSSLHeaders单元中的Indy的WhichFailedToLoad()函数将告诉您无法加载OpenSSL的原因.要么您没有安装OpenSSL DLL,要么安装了不兼容的DLL版本,而这些版本缺少Indy正在寻找的功能.试试Indy Fulgan mirror上提供的DLL.