【问题标题】:TLS Issue using the Demo site使用演示站点的 TLS 问题
【发布时间】:2018-05-29 20:54:06
【问题描述】:

从今天开始,我在发送包裹时收到以下错误消息:

Error calling Login: The request was aborted: Could not create SSL/TLS secure channel.

我的代码

StringBuilder authHeader = new StringBuilder(
                $"{{\"Username\":\"{userId}\", \"Password\":\"" +
                $"{password}\", \"IntegratorKey\":\"{IntegratorKey}\"");

            authHeader.Append(
                string.IsNullOrEmpty(senderEmail)
                    ? "}}"
                    : $",\"SendOnBehalfOf\": \"{senderEmail}\"}}");

            Configuration.Default.AddDefaultHeader(
                "X-DocuSign-Authentication",
                authHeader.ToString());

            AuthenticationApi api = new AuthenticationApi();
            return api.Login();

巧合的是,今天是在 DocuSign 演示站点上禁用 TLS1.0 的日子。 (source) 虽然我知道这一点,但我的应用程序使用 .NET 4.7 框架,默认情况下将使用 TLS1.2。因此,这应该不是问题 当我使用找到 here 的 DocuSign NuGet 包时,我查看了源代码,它使用 .NET 4.5(除非另有说明,否则它使用 TLS1.0)

我知道我可以实现 this solution 但是,由于我的应用程序使用 .NET 4.7,它不应该工作吗?

【问题讨论】:

  • 我认为社区无法帮助您。看来您需要等到该库更新
  • 当然,但我原以为 DocuSign 会在删除 TLS1.0 支持之前升级库,至少这对我来说是有意义的......
  • .Net 4.7 提供的 TLS 选项是一回事。 ServicePointManager 默认是另一个。 ServicePointManager(最高 .Net 4.7.1)协商 SSL3 和 TLS 1.0。如果要确保协商 TLS 1.2,则必须显式启用协议(不包括进程中的其他协议,设置 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12)。然后,它取决于服务器可以在握手中达成什么协议。但是如果不启用TLS1.2,就不会协商。
  • 我忘了说,你可以用这个来检查什么 SSL 协议版本:Which TLS version was negotiated?
  • @Jimi:谢谢,但如果你没有注意到,我是最初提出这个问题的人“协商了哪个 Tls 版本”,所以我知道这一点。仅当我要修改我不感兴趣的 DocuSign SDK 时,答案才有效,因为我想使用官方的

标签: c# docusignapi


【解决方案1】:

所有 DocuSign API 和端点都需要 TLS 1.1 或更高版本。 我们所有的库现在都支持 TLS 1.2,包括 DocuSign eSign C# Nuget 包。 看这里 - https://support.docusign.com/en/articles/End-of-TLS-1-0-and-weak-cipher-support

【讨论】:

  • 你能说明你声明的官方出处吗?
  • 你是对的。我修改了我的答案以反映这一点。
猜你喜欢
  • 1970-01-01
  • 2018-11-06
  • 1970-01-01
  • 2018-01-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多