Adding your CA to Trusted Root CA store of devices
Install the CA Cert as a trusted root CA
On Windows:
Assuming the path to your generated CA certificate as C:\ca.pem, run:
Import-Certificate -FilePath "C:\ca.pem" -CertStoreLocation Cert:\LocalMachine\Root
- Set
-CertStoreLocationtoCert:\CurrentUser\Rootin case you want to trust certificates only for the logged in user.
OR
In Command Prompt, run:
certutil.exe -addstore root C:\ca.pem
certutil.exeis a built-in tool (classicSystem32one) and adds a system-wide trust anchor.
On Android:
The exact steps vary device-to-device, but here is a generalised guide:
- Open Phone Settings
- Locate
Encryption and Credentialssection. It is generally found underSettings > Security > Encryption and Credentials - Choose
Install a certificate - Choose
CA Certificate - Locate the certificate file
ca.pemon your SD Card/Internal Storage using the file manager. - Select to load it.
- Done!
On Debian & Derivatives (Ubuntu):
- Move the CA certificate (
ca.pem) into/usr/local/share/ca-certificates/ca.crt. - Update the Cert Store with:
sudo update-ca-certificates
Refer to the documentation here and here.
On Fedora
- Move the CA certificate (
ca.pem) to/etc/pki/ca-trust/source/anchors/ca.pemor/usr/share/pki/ca-trust-source/anchors/ca.pem - Now run (with sudo if necessary):
update-ca-trust
Refer the documentation here.
On Arch
System-wide – Arch(p11-kit) (From arch wiki)
- Run (As root)
trust anchor --store myCA.crt
- The certificate will be written to /etc/ca-certificates/trust-source/myCA.p11-kit and the "legacy" directories automatically updated.
- If you get "no configured writable location" or a similar error, import the CA manually:
- Copy the certificate to the /etc/ca-certificates/trust-source/anchors directory.
- and then
update-ca-trust
wiki page here