Mono TLS1.2 问题 - btls-cert-sync "command not found"
Mono TLS1.2 issues - btls-cert-sync "command not found"
总结:
我的公司使用 TargetProcess (TP) 来跟踪开放项目的进度,我们创建了一小段代码来将更新导入到 TargetProcess。
目前在提交构建时,我们启动了一个预装了 Mono 的 debian docker 映像,它运行我们的小型 .NET(C#) 程序以将我们的更新连接到 TP。
转载:
看来 TP 最近更新了他们的 API 以仅接受 TLS1.2 连接,因此我们不得不创建一个新的 docker 图像,上面有 Mono 4.8,Alpha 通道(根据这个article)。
在 docker 图像上安装这个新的 Mono,该程序仍然无法开箱即用,因此我们采取了一些步骤:(按照 Mono 安全常见问题解答的提示)
// Made sure that the most current version ca-certificates-mono is installed
// and it seems to have been installed upon installation of mono 4.8
apt-get install ca-certificates-mono
// This should be an unnecessary step from what I read, but ran anyway
cert-sync /etc/ssl/certs/ca-certificates.crt
// lastly btls-cert-sync command, but can't seem to get it to not return
// "command not found" no matter wher I try running it
btls-cert-sync
测试:
关于如何测试您的证书格式是否正确,thread 似乎非常有用。在我的 docker 图像中 运行 这个测试命令之后,我仍然看到下面的失败消息。
MONO_TLS_PROVIDER=btls csharp -e 'Console.WriteLine (new System.Net.WebClient ().DownloadString ("https://www.howsmyssl.com/").IndexOf ("1.2"))'
// error message
System.Net.WebException: Error: TrustFailure (Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED) ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSLroutines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
任何让我们的单声道实例接受 TLS1.2 连接的帮助或建议都很棒。
btls-cert-sync
是 btls-cert-sync.exe
的 shell 脚本
找到btls-cert-sync.exe
,正常情况下安装在4.8.0/lib/mono/4.8
和运行里面用mono
:
mono btls-cert-sync.exe
自 mono 4.8 beta 3 起,btls-cert-sync 似乎已合并到 cert-sync。
请确保您拥有 cert-sync 的 up-to-date 版本,因为即使您更新了 mono,仍可能安装旧版本的 cert-sync 因为 ca-certificates-mono 软件包尚未更新 (Linux)。
如果您查看 cert-sync 输出,您将看到
Mono Certificate Store Sync - version 4.8.0.0
...
Importing into legacy system store:
...
Importing into BTLS system store:
...
总结:
我的公司使用 TargetProcess (TP) 来跟踪开放项目的进度,我们创建了一小段代码来将更新导入到 TargetProcess。 目前在提交构建时,我们启动了一个预装了 Mono 的 debian docker 映像,它运行我们的小型 .NET(C#) 程序以将我们的更新连接到 TP。
转载:
看来 TP 最近更新了他们的 API 以仅接受 TLS1.2 连接,因此我们不得不创建一个新的 docker 图像,上面有 Mono 4.8,Alpha 通道(根据这个article)。 在 docker 图像上安装这个新的 Mono,该程序仍然无法开箱即用,因此我们采取了一些步骤:(按照 Mono 安全常见问题解答的提示)
// Made sure that the most current version ca-certificates-mono is installed
// and it seems to have been installed upon installation of mono 4.8
apt-get install ca-certificates-mono
// This should be an unnecessary step from what I read, but ran anyway
cert-sync /etc/ssl/certs/ca-certificates.crt
// lastly btls-cert-sync command, but can't seem to get it to not return
// "command not found" no matter wher I try running it
btls-cert-sync
测试:
关于如何测试您的证书格式是否正确,thread 似乎非常有用。在我的 docker 图像中 运行 这个测试命令之后,我仍然看到下面的失败消息。
MONO_TLS_PROVIDER=btls csharp -e 'Console.WriteLine (new System.Net.WebClient ().DownloadString ("https://www.howsmyssl.com/").IndexOf ("1.2"))'
// error message
System.Net.WebException: Error: TrustFailure (Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED) ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSLroutines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
任何让我们的单声道实例接受 TLS1.2 连接的帮助或建议都很棒。
btls-cert-sync
是 btls-cert-sync.exe
找到btls-cert-sync.exe
,正常情况下安装在4.8.0/lib/mono/4.8
和运行里面用mono
:
mono btls-cert-sync.exe
自 mono 4.8 beta 3 起,btls-cert-sync 似乎已合并到 cert-sync。
请确保您拥有 cert-sync 的 up-to-date 版本,因为即使您更新了 mono,仍可能安装旧版本的 cert-sync 因为 ca-certificates-mono 软件包尚未更新 (Linux)。
如果您查看 cert-sync 输出,您将看到
Mono Certificate Store Sync - version 4.8.0.0
...
Importing into legacy system store:
...
Importing into BTLS system store:
...