简体   繁体   中英

TLS errors using Chilkat library to access Microsoft Graph APIs

I've been trying to use Chilkat library to play around and learn about using Microsoft Graph APIs but it seems I keeps getting TLS errors (connectFailReason 109) with even the simplest GETs and POSTs. This is what a typical log looks like:

ChilkatLog:
  QuickGetSb:
    DllDate: May 29 2021
    ChilkatVersion: 9.5.0.87
    UnlockPrefix: XXXXXXXXXXXXXXXX
    Architecture: Little Endian; 32-bit
    Language: C++ Builder / clang / 32-bit
    VerboseLogging: 0
    Component successfully unlocked using purchased unlock code.
    url: https://graph.microsoft.com/v1.0/users
    httpRequestStr:
      a_quickReq:
        quickHttpRequest:
          httpVerb: GET
          url: https://graph.microsoft.com/v1.0/users
          openHttpConnection:
            Opening connection directly to HTTP server.
            httpHostname: graph.microsoft.com
            httpPort: 443
            tls: True
            socket2Connect:
              connect2:
                connectImplicitSsl:
                  clientHandshake:
                    clientHandshake2:
                      ProcessHelloRetryRequest:
                        readHandshakeMessages:
                          WindowsError: An existing connection was forcibly closed by the remote host.
                          WindowsErrorCode: 0x2746
                          maxToReceive: 5
                          Failed to receive data on the TCP socket
                          Failed to read beginning of SSL/TLS record.
                          b: 0
                          dbSize: 0
                          nReadNBytes: 0
                          idleTimeoutMs: 60000
                        --readHandshakeMessages
                      --ProcessHelloRetryRequest
                    --clientHandshake2
                  --clientHandshake
                  Client handshake failed. (3)
                --connectImplicitSsl
                connectFailReason: 109
                ConnectFailReason: 109
              --connect2
            --socket2Connect
            connect: Socket fatal error.
          --openHttpConnection
        --quickHttpRequest
      --a_quickReq
    --httpRequestStr
    Failed.
  --QuickGetSb
--ChilkatLog

The library is not the very latest version but it isn't TOO old (about a year and a half - version 9.5.0.86). I didn't want to upgrade just yet because I have some "live" projects using this dev box (and this is just a "learning journey") so I was wondering if anyone can tell me whether the library version is the most likely issue or whether, perhaps, I'm missing some simple settings in the CkHttp object - the only thing I really do with it is set the auth token (which seems to have been retrieved correctly judging from the logs I output.

The actual API calls are pretty straightforward - mostly simple (slightly modified) examples from Chilkat website. But even the simplest http.quickGetStr("https://graph.microsoft.com/v1.0/me"); fails with a log similar to the above.

So, if anyone can suggest any properties to set to ckHttp to solve this issue (or confirm that library needs to be upgraded to access graph.microsoft.com - if, indeed, that is the case) - I would greatly appreaciate it.

Marko

This problem is already fixed. Contact support@chilkatsoft.com to get a pre-release build for v9.5.0.92.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM