首页 > 解决方案 > 远程证书仅对 Linux 上的 .net core 应用程序无效

问题描述

我有一个 dotnet 核心应用程序,它通过控制器 => 操作向 S3 存储桶发出外部请求。这样:

using (var client = new AmazonS3Client(credentials, Amazon.RegionEndpoint.EUSouth1))
{
   return await client.GetObjectAsync(request);
}

当我向执行此代码的端点发出请求时,我在 Mac 和 Windows 上都获得了成功的结果。当我为应用程序创建一个 Linux 容器(目标是部署这个容器)时,问题就出现了,在这种情况下,我得到以下异常:

System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

你能帮助我吗?

标签: linuxdockerssl.net-core

解决方案


推荐阅读