简体   繁体   English

使用 Chilkat 库访问 Microsoft Graph API 的 TLS 错误

[英]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.我一直在尝试使用 Chilkat 库来玩耍并了解如何使用 Microsoft Graph API,但即使是最简单的 GET 和 POST,我似乎也会不断收到 TLS 错误(connectFailReason 109)。 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).该库不是最新版本,但也不算太旧(大约一年半 - 版本 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.我还不想升级,因为我有一些使用这个开发盒的“实时”项目(这只是一个“学习之旅”)所以我想知道是否有人可以告诉我库版本是否是最有可能的问题或者,也许,我在 CkHttp object 中缺少一些简单的设置——我真正用它做的唯一一件事就是设置身份验证令牌(从我 output 的日志判断,这似乎已正确检索。

The actual API calls are pretty straightforward - mostly simple (slightly modified) examples from Chilkat website.实际的 API 调用非常简单——大部分来自 Chilkat 网站的简单(稍作修改)示例。 But even the simplest http.quickGetStr("https://graph.microsoft.com/v1.0/me");但即使是最简单的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.因此,如果有人可以建议将任何属性设置为 ckHttp 以解决此问题(或确认需要升级库以访问 graph.microsoft.com - 如果确实如此) - 我会非常感激它。

Marko马尔科

This problem is already fixed.这个问题已经解决了。 Contact support@chilkatsoft.com to get a pre-release build for v9.5.0.92.联系 support@chilkatsoft.com 以获取 v9.5.0.92 的预发布版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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