Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi 德尔福XE4 Pro THTTPRIO&x2B;https连接_Delphi_Ssl_Delphi Xe4 - Fatal编程技术网

Delphi 德尔福XE4 Pro THTTPRIO&x2B;https连接

Delphi 德尔福XE4 Pro THTTPRIO&x2B;https连接,delphi,ssl,delphi-xe4,Delphi,Ssl,Delphi Xe4,我使用的是Delphi XE4 Pro 我用webBroker创建了一个服务器DLL,并创建了导入服务器WSDL接口的客户端DLL。 一切正常,但现在我想使用安全连接https进行连接。 在服务器上,我拥有godaddy颁发的有效*.domain SSL证书。 通过简单地将RIO URL更改为使用https,所有客户机-服务器通信仍然有效 我的问题是:您知道现在在XE4中THTTPRIO是否能够自动处理https连接,或者我需要(以某种方式)更改代码吗? 另外,您能推荐一个好的工具来验证标题,以

我使用的是Delphi XE4 Pro 我用webBroker创建了一个服务器DLL,并创建了导入服务器WSDL接口的客户端DLL。 一切正常,但现在我想使用安全连接https进行连接。 在服务器上,我拥有godaddy颁发的有效*.domain SSL证书。 通过简单地将RIO URL更改为使用https,所有客户机-服务器通信仍然有效

我的问题是:您知道现在在XE4中THTTPRIO是否能够自动处理https连接,或者我需要(以某种方式)更改代码吗? 另外,您能推荐一个好的工具来验证标题,以便查看我是否使用了良好的https连接吗

非常感谢

function GetIHFSINET(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IHFSINET;
const
  defWSDL_server = 'https://etc';
  defURL_server  = 'https://etc';
  defSvc  = 'IHFSINETservice';
  defPrt  = 'IHFSINETPort';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
    Addr := defWSDL_server;  //there is actually a function that returns the correct URL to use
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as IHFSINET);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;

将URL更改为https是您所需要做的全部-它将通过将端口更改为443等来处理其余的事情


至于验证消息,您可能需要查看RIO.onbeforecute和RIO.OnAfterExecute事件。

至于分析http请求的工具,我发现Fiddler非常有用[服务器证书验证是什么?