How to list all available SSL CA certificates on CentOS 6?


Nathan Basanese

After installing the certificate, it's hard to tell if I've successfully trusted a given certificate, especially for the root CA.

To check if I have successfully installed a certificate without making an SSL request to a server that may or may not provide the service, I want to list all the ssl certificates available system wide .

I followed the instructions here and they worked:

https://serverfault.com/questions/559571/install-a-root-certificate-in-centos-6

Also, this asks a similar question, but provides an answer for the gentoo system:

List all available ssl ca certificates

Nathan Basanese

//, use opensslcommand to get output from it/etc/ssl/certs/ca-bundle.crt

Anyway, I tried the following, mostly copied from https://unix.stackexchange.com/a/97249/48498 , and it seems to work if I change the filename to CentOS 6:

If you don't want to bother with that flag or similar on --insecurecURL, , wgetGit, etc , you can add a CA root certificate, self-signed certificate or certificate chain to your truststore like this:

1. Follow the instructions to download .crt, .pemor .cerof your choice.

2. Obtain the certificate you want to trust by using any mechanism, usually downloading the certificate from a central repository openssl s_client -showcerts -connect some.host.that.uses.that.root:443, or extracting the certificate from the SSL handshake using or similar , and copying it to the following folder on the target CentOS 6 host :

    /etc/pki/ca-trust/source/anchors/

While logged in to the target host, run the following command:

    $ sudo update-ca-trust enable; sudo update-ca-trust extract

Verify the result on Red Hat based OS , for example:

    $ awk -v cmd='openssl x509 -noout -subject' '
        /BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-bundle.crt

This will produce a long list of responses of the form:

    subject= /C=US/O=MyCorp/CN=root-ca-2048

Step 4 above answers the question, the others provide context for the unwary.

Related


How to list all available SSL CA certificates on CentOS 6?

Nathan Basanese After installing the certificate, it's hard to tell if I've successfully trusted a given certificate, especially for the root CA. To check if I have successfully installed a certificate without making an SSL request to a server that may or may

How to list all available SSL CA certificates on CentOS 6?

Nathan Basanese After installing the certificate, it's hard to tell if I've successfully trusted a given certificate, especially for the root CA. To check if I have successfully installed a certificate without making an SSL request to a server that may or may

How to setup Dart to use CA SSL certificates?

Steven Ross I recently deployed a Dart server application that handles HTTP requests. I'd like to add support for HTTPS, so have been trying to add SSL to a Dart server application. This answer provides a clear explanation of how to add a self-signed SSL certi

How to setup Dart to use CA SSL certificates?

Steven Ross I recently deployed a Dart server application that handles HTTP requests. I'd like to add support for HTTPS, so have been trying to add SSL to a Dart server application. This answer provides a clear explanation of how to add a self-signed SSL certi

How to setup Dart to use CA SSL certificates?

Steven Ross I recently deployed a Dart server application that handles HTTP requests. I'd like to add support for HTTPS, so have been trying to add SSL to a Dart server application. This answer provides a clear explanation of how to add a self-signed SSL certi

How to setup Dart to use CA SSL certificates?

Steven Ross I recently deployed a Dart server application that handles HTTP requests. I'd like to add support for HTTPS, so have been trying to add SSL to a Dart server application. This answer provides a clear explanation of how to add a self-signed SSL certi

Java 7 - How SSL trusts all certificates

Uri Lukach I'm writing a Java proxy that uses SSL to communicate with other servers. With ServerSocketFactory and keystore and truststore populated by server certificate everything works perfectly. I was wondering, is there a way in Java 7 to disable authentic

Java 7 - How SSL trusts all certificates

Uri Lukach I'm writing a Java proxy that uses SSL to communicate with other servers. With ServerSocketFactory and keystore and truststore populated by server certificate everything works perfectly. I was wondering, is there a way in Java 7 to disable authentic

Python SSL server serving intermediate CA certificates

light I'm writing some server code using the Python (2.7) SSL module as follows: ssock = ssl.wrap_socket(sock, ca_certs="all-ca.crt", keyfile="server.key", certfile="server.crt", server_side=True, ssl_version=ssl.PROTOCOL_TLSv1) 'all-ca.crt' contains the signi

Python SSL server serving intermediate CA certificates

light I'm writing some server code using the Python (2.7) SSL module as follows: ssock = ssl.wrap_socket(sock, ca_certs="all-ca.crt", keyfile="server.key", certfile="server.crt", server_side=True, ssl_version=ssl.PROTOCOL_TLSv1) 'all-ca.crt' contains the signi

How spring boot ssl trusts all valid certificates

Haizang-kun I have enabled ssl in my spring boot application and whenever i want to use a Rest service like googleapis or facebook i have to add a certificate in the truststore. I use openssl to get the certificate: openssl s_client -connect googleapis.com:443

NSURLConnection: use all CA certificates installed on the device

grumble I want to access some web resources using HTTPS in a custom iOS 6 app. Some target servers are using a certificate signed by a CA, which is not included by default in iOS but has been manually added to the device's keychain. So all URLs can be opened i

NSURLConnection: use all CA certificates installed on the device

grumble I want to access some web resources using HTTPS in a custom iOS 6 app. Some target servers are using a certificate signed by a CA, which is not included by default in iOS but has been manually added to the device's keychain. So all URLs can be opened i

CentOS 6 drbd not available

e2-e4 In CentOS 6 (6.6), the drbd package is not available nor from the extras repository. There is some info online like configure-drbd-centos-6-5 which I think will work on CentOS 6.6. However, drbd is a good package, and there doesn't seem to be an "officia

List all enabled services centos 6

Smith I feel like this should be simple, I know the centos 7 command, but I can't find the centos 6 command to list all enabled services. The Centos 7 command I have is systemctl list-unit-files | grep enabled I got a nice list from all enabled services. I ju