简而言之,我如何使用Indy进行HTTPS?

时间:2016-10-19 00:32:00

标签: delphi ssl https indy indy10

实际上,我的问题没有答案。

我用这个答案的解决方案(第23节)继续“观察到EOF”。 只有sslvSSLv2给出更改“错误:00000006:lib(0):func(0):EVP lib”。有缺陷的DLL?

根据documentation,它非常简单 - 拥有一个DLL,然后只需将TIdSSLIOHandlerSocketOpenSSL实例分配给IOHandler属性,并将协议切换为https。但是这样做,我立即面临SSL错误,并显示消息“与SSL连接时出错。观察到违反协议的EOF”。奇怪的是,我也有TIdLogDebug,但我没有看到任何带有虚假EOF的协议转储。

如何启用HTTPS?

FWIW,我有TIdHTTPTIdSSLIOHandlerSocketOpenSSL处于全默认状态(已关联的TIdLogDebugTIdCookieManager除外)

  object IdHTTP: TIdHTTP
    Intercept = IdLogDebug
    IOHandler = IdSSLIOHandlerSocketOpenSSL
    AllowCookies = True
    ProxyParams.BasicAuthentication = False
    ProxyParams.ProxyPort = 0
    Request.ContentLength = -1
    Request.ContentRangeEnd = -1
    Request.ContentRangeStart = -1
    Request.ContentRangeInstanceLength = -1
    Request.Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
    Request.BasicAuthentication = False
    Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)'
    Request.Ranges.Units = 'bytes'
    Request.Ranges = <>
    HTTPOptions = [hoForceEncodeParams]
    CookieManager = IdCookieManager
    Left = 200
    Top = 56
  end
  object IdSSLIOHandlerSocketOpenSSL: TIdSSLIOHandlerSocketOpenSSL
    Intercept = IdLogDebug
    MaxLineAction = maException
    Port = 0
    DefaultPort = 0
    SSLOptions.Mode = sslmUnassigned
    SSLOptions.VerifyMode = []
    SSLOptions.VerifyDepth = 0
    Left = 208
    Top = 128
  end

FWIW再次,我正在使用XE7与股票Indy 10.6.1.5182

0 个答案:

没有答案