Trusted Root Certificates in DotNet Core on Linux (RHEL 7.1)

前端 未结 1 1190
囚心锁ツ
囚心锁ツ 2020-12-06 18:56

I\'m currently deploying a .net-core web-api to an docker container on rhel 7.1. Everything works as expected, but from my application I need to call other services via htt

相关标签:
1条回答
  • 2020-12-06 19:27

    Since .NET Core uses OpenSSL on linux, you need to set up your linux environment in the container so that OpenSSL will pick up the certificate.

    This is done by (+ Dockerfile examples):

    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/ or on RHEL /etc/pki/ca-trust/source/anchors/:

       COPY myca.crt /usr/local/share/ca-certificates/
      
    2. Invoking update-ca-certificates:

       RUN update-ca-certificates
      
    0 讨论(0)
提交回复
热议问题