.net core在linux平台上哪里找证书 [英] Where does .net core search for certificates on linux platform
问题描述
在 Windows 上,对于 .NET Framework 类,我们可以将 sslkeyrepository
指定为 *SYSTEM/*USER.On linux
.NET Core 类在哪里搜索 certificates
默认情况下,sslkeyrepository
的值可能是什么.
On Windows, for .NET Framework classes we can specify sslkeyrepository
as *SYSTEM/*USER.On linux
where does the .NET Core classes search for the certificates
by default and what could be the values for sslkeyrepository
.
推荐答案
.Net Core
在 Linux 上使用 OpenSSL
,因此,您需要设置您的 Linux environment
在容器中,以便 OpenSSL
将获取证书.
.Net Core
uses OpenSSL
on Linux, as a result, you need to set up your Linux environment
in the container so that OpenSSL
will pick up the certificate.
您可以通过两种方式做到这一点:
You can do this by two ways:
将证书
.crt
文件复制到update-ca-certificates
将扫描可信证书的位置 - 例如/usr/local/share/ca-certificates/
oron RHEL/etc/pki/ca-trust/source/anchors/
:
Copying the certificate
.crt
file to a location thatupdate-ca-certificates
will scan for trusted certificates - e.g./usr/local/share/ca-certificates/
oron RHEL/etc/pki/ca-trust/source/anchors/
:
COPY myca.crt /usr/local/share/ca-certificates/
调用update-ca-certificates
:
RUN update-ca-certificates
这篇关于.net core在linux平台上哪里找证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!