I'm writing a SOAP client application on Ubuntu using OpenSSL and C++. I am having trouble getting my code to validate the server certificate even though I know has a valid certificate.

Just to make sure I would like to check that it's the case and apparently PEM files are used to list valid certificates.

Can anyone tell me where these files reside on my Ubuntu 12.04 installation? I have the ca-certificates package installed on my machine, so these files must be there somewhere?

3 Answers 3


So if you have installed ca-certificates you can easily find out where the files are. Open a terminal and enter

> dpkg -L ca-certificates

So you'll see that all certificates are in /usr/share/ca-certificates. However the default location for certificates is /etc/ssl/certs. You might find additional certificates there.


Try this

sudo find / |grep "\.pem"

This will list all the .pem files present on your system and their full path.

  • 2
    This is not really an answer.
    – guntbert
    May 30, 2014 at 9:59
  • 3
    Not an answer but very useful! Thanks @Mausy5043 for posting this. Oct 3, 2016 at 19:33
  • sudo is probably unnecessary, since these files needn't be hidden. Also, find can itself test name parameters, so I recommend find / -name "*.pem" Jun 22, 2017 at 14:27
  • 2
    @sondra.kinsey : finding upwards from / without using sudo will generate a lot of errors for directories that the user has no access to. Using sudo (or redirecting by adding 2> /dev/null keeps the output clean.
    – Mausy5043
    Jun 24, 2017 at 10:51

Probably this would help you:

apt-get install apt-file

apt-file update

apt-file list ca-certificates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.