Identify Certificate Authority from public key Under OS X, the /usr/local/etc/openssl/cert.pem contains many certificates in this format:

----BEGIN CERTIFICATE-----
 &lt;...snip..&gt;
----END CERTIFICATE-----


In Ubuntu, in /etc/ssl/certs, each certificate is in its own file; with the files named like Visa_eCommerce_Root.pem, Swisscom_Root_CA_1.pem etc.

I was wondering if on OS X there is a way I can get similar names for each certificate contained in the cert.pem file?

PS. The context is that I am trying to debug an issue on OS X where some SSL connections fail, but when I import all the .pem files from Ubuntu into OS X, the SSL connection works. I wanted to identify which certificate is missing on OS X.
In OS X you can inspect all the system root certificates by doing the following:


Press cmd + spacebar and then type "keychain access" followed by return.
Select "System Roots" and "Certificates" in the left side pane.


You should now see all the root certs installed and used by OS X e.g.



You should be able to compare this list to the list of certs installed on your Ubuntu box.

PS: You can parse the cert.pem certificate via openssl x509 -text -noout &lt; /usr/local/etc/openssl/cert.pem. This won't give you a list of roots though, just a single cert (whose purpose I am unsure of).