.net Core在Linux平台上的哪里搜索证书 [英] Where does .net core search for certificates on linux platform

查看:109
本文介绍了.net Core在Linux平台上的哪里搜索证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows上,对于.NET Framework类,我们可以将 sslkeyrepository 指定为* SYSTEM / * USER。在 linux 上默认情况下,.NET Core类在哪里搜索证书 sslkeyrepository 的值是什么。 p>

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 使用 OpenSSL 在Linux上,因此,您需要在容器中设置 Linux环境,以便 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:


  1. 将证书 .crt 文件复制到 update-ca-certificates 将扫描的位置可信证书-例如 / usr / local / share / ca-certificates / oron RHEL / etc / pki / ca-trust / source / anchors /

  1. Copying the the certificate .crt file to a location that update-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屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆