In the nutshell, how do I do HTTPS with Indy?

偶尔善良 提交于 2019-12-12 02:17:31

问题


Actually, my question doesn't have an answer there.

I keep getting "EOF was observed" with solution (v23) of that answer. Only sslvSSLv2 gives a change "error:00000006:lib(0):func(0):EVP lib". Defective DLLs?


According to the documentation it's pretty simple - have a DLLs and then just assign TIdSSLIOHandlerSocketOpenSSL instance to IOHandler property and switch protocol to https. But doing so, I've immediately faced an SSL error with message "Error connecting with SSL. EOF was observed that violates the protocol". Curiously enough, I have TIdLogDebug there as well, but I don't see any protocol dump with spurious EOF.

What should I do to enable HTTPS?


FWIW, I have TIdHTTP and TIdSSLIOHandlerSocketOpenSSL in all-default state (except linked TIdLogDebug and TIdCookieManager)

  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 again, I'm using XE7 with stock Indy 10.6.1.5182

来源:https://stackoverflow.com/questions/40120183/in-the-nutshell-how-do-i-do-https-with-indy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!