Certificates
To install a certificate in .crt format (which is actually a PEM, but with a .crt extension) on an Ubuntu machine:
Basically, we place our .crt file in the global directory /usr/local/share/ca-certificates and then run the update-ca-certificates command, which will read that directory and install the certificate into the global trust store /etc/ssl/certs/java/cacerts.
Execution:
$ sudo apt-get install -y ca-certificates
$ sudo cp local-ca.crt /usr/local/share/ca-certificates
$ sudo update-ca-certificates
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
Adding debian:my_certificate.pem # here it indicates the certificate found in usr/local/share/ca-certificates
done.
Updating Mono key store
Mono Certificate Store Sync - version 6.8.0.105
Populate Mono certificate store from a concatenated list of certificates.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.
....
...
Now we will be able to run curl from our machine against HTTPS (SSL) URLs that are signed with the certificate (certificate authority) that we have imported.
Ref: https://ubuntu.com/server/docs/security-trust-store