使用https和SSL的Delphi 2007和Indy 10 [英] Delphi 2007 and Indy 10 using https and SSL

查看:228
本文介绍了使用https和SSL的Delphi 2007和Indy 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我删除了TIdHTTP和TIdSSLIOHandlerSocketOpenSSL,将IdHTTP的IOHandler设置为SSL处理程序,并将TIdSSLIOHandlerSocketOpenSSL的模式设置为sllmClient。然后在下面添加按钮单击事件。我第一次从WhereFailedToLoad收到此错误。

I've dropped a TIdHTTP and a TIdSSLIOHandlerSocketOpenSSL, set the IOHandler of the IdHTTP to the SSL handler, set the mode of the TIdSSLIOHandlerSocketOpenSSL to sllmClient. And then added the button click event below. The first time I get this error from WhichFailedToLoad.

显示,我第二次按下该按钮。 ssl dll位于.exe目录中。

Displayed, the second time I press the button it works. The ssl dll's are in the .exe diretory.

该服务可从浏览器正常工作,并且已投入生产。为什么它第一次不起作用?

The service works fine from the browser and is in production. Why doesn't it work the first time?

procedure TForm32.Button1Click(Sender: TObject);
var
  output : TMemoryStream;
begin
    output:=TMemoryStream.Create;
//    IdOpenSSLSetLibPath(
  try
    IdHTTP1.get('https://localhost:444/Folder/service.svc',output);
    output.position := 0;
    memo1.lines.LoadFromStream(output);
  except
    on exception do
    ShowMessage(WhichFailedToLoad());
  end;
end;

tia

推荐答案

您必须使用的是Indy 10的非常老旧的版本-该消息框中报告的大多数函数的后缀为 _Indy

You must be using a really old and outdated version of Indy 10 - most of the reported functions in that message box have an _Indy suffix on them.

Indy 9和更早的Indy 10版本需要定制的OpenSSL DLL,这些DLL添加了Indy特定的功能来访问内部OpenSSL数据(尚未在公共OpenSSL API中公开)在以后的API版本中公开了这些数据之后,Indy 10进行了更新,不再需要自定义的DLL。现在,它按原样使用标准化的OpenSSL DLL。

Indy 9 and earlier, and early Indy 10 releases, require custom-built OpenSSL DLLs that add Indy-specific functions to access internal OpenSSL data that was not yet exposed in the public OpenSSL API. Once that data was exposed in later API releases, Indy 10 was updated to no longer require the custom-built DLLs anymore. It now uses the standardized OpenSSL DLLs as-is.

所以您要么需要追踪旧的定制I ndy OpenSSL DLL,或者您需要升级到最新的Indy 10版本。

So you either need to track down the old custom-built Indy OpenSSL DLLs, or you need to upgrade to an up-to-date Indy 10 version.

这篇关于使用https和SSL的Delphi 2007和Indy 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆