Archived Forum Post

Index of archived forum posts

Question:

ChilkatHttp: ssl handshake failure

Dec 31 '16 at 05:47

Hi,

Before updating a legacy app I am trying ChilkatHttp with different scénarios

I am unable to properly request the url https://requestb.in/zjdmfzzj

this url should return "ok" (tested with the browser, postman and the old component)

Bellow is the code used and the result of the execution.

Am I doing something wrong ?

The code:

Private Sub test1()
    Dim http As New ChilkatHttp

    Dim success As Long

    '  Any string unlocks the component for the 1st 30-days.
    success = http.UnlockComponent("Chilkat_HTTP_licence")
    If (success <> 1) Then
        Debug.Print http.LastErrorText
        Exit Sub
    End If

    '  Send the HTTP GET and return the content in a string.
    Dim html As String
    html = http.QuickGetStr("https://requestb.in/zjdmfzzj")

    Debug.Print "html: " & html
    Debug.Print vbCrLf & "--------" & vbCrLf & "LastMethodSuccess: " & http.LastMethodSuccess
    Debug.Print vbCrLf & "--------" & vbCrLf & "LastErrorText: " & http.LastErrorText
End Sub

The result:

html:

--------
LastMethodSuccess: 1

--------
LastErrorText: ChilkatLog:
  QuickGetStr:
    DllDate: Oct 29 2015
    ChilkatVersion: 9.5.0.54
    UnlockPrefix: NETINOHttp
    Username: SIPEX:Reda
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    url: https://requestb.in/zjdmfzzj
    httpRequestStr:
      a_quickReq:
        quickHttpRequest:
          httpVerb: GET
          url: https://requestb.in/zjdmfzzj
          openHttpConnection:
            Opening connection directly to HTTP server.
            httpHostname: requestb.in
            httpPort: 443
            ssl: 1
            socket2Connect:
              connect2:
                connectImplicitSsl:
                  clientHandshake:
                    clientHandshake2:
                      readHandshakeMessages:
                        processAlert:
                          TlsAlert:
                            level: fatal
                            descrip: handshake failure
                          --TlsAlert
                        --processAlert
                        Aborting handshake because of fatal alert.
                      --readHandshakeMessages
                    --clientHandshake2
                  --clientHandshake
                  Client handshake failed. (3)
                --connectImplicitSsl
                ConnectFailReason: 103
              --connect2
            --socket2Connect
          --openHttpConnection
        --quickHttpRequest
      --a_quickReq
    --httpRequestStr
    Failed.
  --QuickGetStr
--ChilkatLog

Accepted Answer

You're using an old version of Chilkat. Update to the latest version and re-try...