INDY 10.1.5 - 哪些 SSL dll 可与 Delphi 2006 配合使用?

发布于 2024-08-15 01:37:39 字数 505 浏览 9 评论 0原文

我正在尝试连接到 google 文档(遵循 Marco Cantu 的出色 REST 示例),但出现以下 SSL 错误:

1) 如果我使用 openssl-0.9.8i-i386-win32.zip 中的 SSL dll,则会出现错误:

“无法加载 SSL 库”

2) 如果我使用 indy_OpenSSL096m.zip 中的 SSL dll,则会收到错误:

“使用 SSL 连接时出错”

3) 如果我使用 openssl-0.9.8h-i386-win32- 中的 SSL dll Indy-IntraWebEdition.zip 我收到错误:

“无法加载 SSl 库”

现在我对此进行了研究,并且有很多关于 dll 的死链接的建议,包括堆栈溢出的链接。我怀疑我需要找到与我正在使用的 INDY 版本兼容的 SSL dll。

我的问题是,有谁确切知道哪些 SSL dll 与 Delphi 2006 和 Delphi 2006 兼容?印第10.1.5?

I'm trying to connect to google documents (following Marco Cantu's excellent REST example) but I am getting the following SSL errors:

1) If I use the SSL dlls from openssl-0.9.8i-i386-win32.zip I get the error:

"Could not load SSL library"

2) If I use the SSL dlls from indy_OpenSSL096m.zip I get the error:

"Error connecting with SSL"

3) If I use the SSL dlls from openssl-0.9.8h-i386-win32-Indy-IntraWebEdition.zip I get the error:

"Could not load SSl Library"

Now I've researched this and there are a lot of recommendations with dead links to dlls about, including links on stack overflow. I suspect I need to find the SSL dlls that are compatible with the version of INDY I am using.

My question is, does anyone know exactly which SSL dlls are compatible with Delphi 2006 & INDY 10.1.5?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

謸气贵蔟 2024-08-22 01:37:39

即使在升级到 INDY 10.2.3 后,我也遇到了同样的问题,并且尝试了我能找到的每个不同版本的“libeay32.dll”和“ssleay32.dll”文件...像 Matt 一样,我总是遇到两个错误之一:“无法加载 SSL 库”或“与 SSL 连接时出错”,类似“error:00000006:lib(0):func(0):EVP lib”...

当我更改 TidSSLioHandlerSocketOpenSSL 时,我非常高兴。 SSLOptions.Method 到 sslvSSLv23 一切都开始工作。

经过更多研究,我很快就明白,每当我收到错误“无法加载 SSL 库”时,我都使用了错误版本的 DLL 文件,每当我收到“与 SSL 连接时出错”,类似“错误:00000006:lib”的信息时,我很快就明白了。 (0):func(0):EVP lib" 我使用了错误的 SSLOptions.Method 值。

其他信息:我正在使用 Delphi 2006、INDY 10.2.3,并且在 WinXP Pro 上运行

这给我带来了很大的痛苦,我希望这篇文章能够节省一些时间。

I had the same problem even after I upgrading to INDY 10.2.3 and I tryed every different version of the “libeay32.dll” and “ssleay32.dll” files I could find ... Like Matt I always got one of the two errors: "Could not load SSL library" or the "Error connecting with SSL" with something like "error:00000006:lib(0):func(0):EVP lib" ...

I was very happy when I change the TidSSLioHandlerSocketOpenSSL.SSLOptions.Method to sslvSSLv23 and everything started working.

A bit more research and I quickly understood anytime I got the error "Could not load SSL library" I was using the wrong version of the DLL files and anytime I got the "Error connecting with SSL" with something like "error:00000006:lib(0):func(0):EVP lib" I was using the wrong SSLOptions.Method value.

Other Info: I'm using Delphi 2006, INDY 10.2.3 and I'm runnin on WinXP Pro

This caused me so much pain, I hope this post will save someone some time.

寄人书 2024-08-22 01:37:39

您可以通过从 Fulgan 网站 下载来进行一些试验和错误。

您可能需要考虑更新您的 Indy 副本并使用最新的 OpenSSL DLL。

You could resort to some trial and error using downloads from the Fulgan site.

You might want to think about updating your copy of Indy and using the most recent OpenSSL DLLs.

空城之時有危險 2024-08-22 01:37:39

FWIW,因为我花了很多时间让这个 https 东西发挥作用,以下是我成功努力的结果。

1- Delphi 7

2- indy9.0.19_d7.exe

3- IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv1;或者,

IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv23;或者,

IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv3;

我在 Delphi 7 下尝试了 indy10.0.76_d7.exe 和 indy10.1.5_d7.exe,但无法正确安装它们,更不用说让 HTTPS 工作了。我收到臭名昭著的消息“Unit IdSysWin32 是使用不同版本的 IdException.EIdException 编译的。”我在网上搜索了该问题的解决方案,但找不到 - 很多其他人也有相同的信息。

用于测试 https 的有用站点是 https://msp.f-secure。 com/web-test/common/test.html

这是我的来源:

procedure TForm1.ButtonHTTPSClick(Sender: TObject);
var
  IdHTTP1: TIdHTTP;
  ParamStringList: TStringList;
  s1: String;
  MemoryStream1: TMemoryStream;
  IdSSLIOHandlerSocket1:  TIdSSLIOHandlerSocket;
begin //  ssl works fine must have Indy version indy9.0.19_d7.exe and must use option  sslvSSLv23

  Screen.Cursor := crHourGlass;
  IdHTTP1 := TIdHTTP.Create(nil);
  IdSSLIOHandlerSocket1 := TIdSSLIOHandlerSocket.Create(nil); 
  IdHTTP1.IOHandler := IdSSLIOHandlerSocket1;

//  IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv1; // sslvSSLv1 works fine
    IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv3; // sslvSSLv3 works fine
//  IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv23; // sslvSSLv23 works fine
//  IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv2;   sslvSSLv2 does not work
    IdSSLIOHandlerSocket1.SSLOptions.Mode := sslmUnassigned;
    IdSSLIOHandlerSocket1.SSLOptions.VerifyMode := [];
  IdSSLIOHandlerSocket1.SSLOptions.VerifyDepth := 0;

  ParamStringList := TStringList.Create;
  MemoryStream1 := TMemoryStream.Create;
  s1 := IdHTTP1.Post('https://msp.f-secure.com/web-test/common/test.html', ParamStringList);
  MemoryStream1.Write(s1[1], Length(s1));
  MemoryStream1.Position := 0;
  MemoryStream1.SaveToFile('c:\temp\MemoryStream1.txt');
  Memo1.Lines.Clear;
  Memo1.Lines.LoadFromFile('c:\temp\MemoryStream1.txt');
  MemoryStream1.Free;
  ParamStringList.Free;
  IdSSLIOHandlerSocket1.Free;
  IdHTTP1.Free;
  Screen.Cursor := crDefault;
end;

FWIW, since I have spent a lot of time getting this https thing to work, here are the results of my successful efforts.

1- Delphi 7

2- indy9.0.19_d7.exe

3- IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv1; or,

IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv23; or,

IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv3;

I tried indy10.0.76_d7.exe and indy10.1.5_d7.exe under Delphi 7 and I cannot get them to install properly, let alone get HTTPS to work. I get the infamous message "Unit IdSysWin32 was compiled with a different version of IdException.EIdException." I searched for a solution to that problem on the web and couldn't find one - loads of others had the same message.

A useful site for testing https is https://msp.f-secure.com/web-test/common/test.html

Here is my source:

procedure TForm1.ButtonHTTPSClick(Sender: TObject);
var
  IdHTTP1: TIdHTTP;
  ParamStringList: TStringList;
  s1: String;
  MemoryStream1: TMemoryStream;
  IdSSLIOHandlerSocket1:  TIdSSLIOHandlerSocket;
begin //  ssl works fine must have Indy version indy9.0.19_d7.exe and must use option  sslvSSLv23

  Screen.Cursor := crHourGlass;
  IdHTTP1 := TIdHTTP.Create(nil);
  IdSSLIOHandlerSocket1 := TIdSSLIOHandlerSocket.Create(nil); 
  IdHTTP1.IOHandler := IdSSLIOHandlerSocket1;

//  IdSSLIOHandlerSocket1.SSLOptions.Method := sslvTLSv1; // sslvSSLv1 works fine
    IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv3; // sslvSSLv3 works fine
//  IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv23; // sslvSSLv23 works fine
//  IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv2;   sslvSSLv2 does not work
    IdSSLIOHandlerSocket1.SSLOptions.Mode := sslmUnassigned;
    IdSSLIOHandlerSocket1.SSLOptions.VerifyMode := [];
  IdSSLIOHandlerSocket1.SSLOptions.VerifyDepth := 0;

  ParamStringList := TStringList.Create;
  MemoryStream1 := TMemoryStream.Create;
  s1 := IdHTTP1.Post('https://msp.f-secure.com/web-test/common/test.html', ParamStringList);
  MemoryStream1.Write(s1[1], Length(s1));
  MemoryStream1.Position := 0;
  MemoryStream1.SaveToFile('c:\temp\MemoryStream1.txt');
  Memo1.Lines.Clear;
  Memo1.Lines.LoadFromFile('c:\temp\MemoryStream1.txt');
  MemoryStream1.Free;
  ParamStringList.Free;
  IdSSLIOHandlerSocket1.Free;
  IdHTTP1.Free;
  Screen.Cursor := crDefault;
end;
兮颜 2024-08-22 01:37:39

据我所知,最新版本的 Indy 可以使用标准 OpenSSL 二进制文件。
从此处下载。不久前,我们使用带有 SSL 连接的 Indy 制作了一个 Delphi FTP 客户端应用程序,我确信我们刚刚发布了当前的 OpenSSL dll。

编辑:刚刚检查了应用程序目录,我们使用的 DLL 是 OpenSSL 0.9.8.2 (3-Aug-06)。 (这是一个旧的应用程序)

编辑2:我刚刚复制了最新的0.9.8k dll,它们也工作得很好。

As far as I am aware the more recent versions of Indy work with standard OpenSSL binaries.
Download from here. We produced a Delphi FTP client app a while ago using Indy with SSL connections and I'm sure we just shipped the current OpenSSL dlls.

Edit: Just checked the app directory and the DLLs we used are OpenSSL 0.9.8.2 (3-Aug-06). (It's an old app)

Edit 2: And I've just copied the more recent 0.9.8k dlls over and they work fine too.

温馨耳语 2024-08-22 01:37:39

找到您正在使用的 Indy 版本。复制 Indy dll,即 libeay32.dll、libssl32.dll 和
将 ssleay32.dll 放入 Windows/System 32 文件夹中。它将解决“无法加载 SSL 库”错误

Find the Indy version you are using.Copy the Indy dlls i.e libeay32.dll,libssl32.dll and
ssleay32.dll into the Windows/System 32 Folder.It will resolve the error "Could not Load SSL Library"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文