How to add Certificate Authority file in CentOS 7

前端 未结 6 1273
天命终不由人
天命终不由人 2020-12-07 20:13

I am trying to add certificate Authority (CA) file name - ca.crt to /etc/ssl/certs, for that I followed this article.

I copied my ca.

6条回答
  •  囚心锁ツ
    2020-12-07 20:49

    Your CA file must have been in a binary X.509 format instead of Base64 encoding; it needs to be a regular DER or PEM in order for it to be added successfully to the list of trusted CAs on your server.

    To proceed, do place your CA file inside your /usr/share/pki/ca-trust-source/anchors/ directory, then run the command line below (you might need sudo privileges based on your settings);

    # CentOS 7, Red Hat 7, Oracle Linux 7
    update-ca-trust
    

    Please note that all trust settings available in the /usr/share/pki/ca-trust-source/anchors/ directory are interpreted with a lower priority compared to the ones placed under the /etc/pki/ca-trust/source/anchors/ directory which may be in the extended BEGIN TRUSTED file format.

    For Ubuntu and Debian systems, /usr/local/share/ca-certificates/ is the preferred directory for that purpose.

    As such, you need to place your CA file within the /usr/local/share/ca-certificates/ directory, then update the of trusted CAs by running, with sudo privileges where required, the command line below;

    update-ca-certificates
    

提交回复
热议问题