Certificate Installation with OpenSSL - Common
Errors
Guides In This Section
Guides In Other Sections
=> OpenSSL can't verify the certificate in question
To explain and fix this error, you first need to understand how OpenSSL
goes about verifying a certificate:
- Look at the key for which the certificate was issued
- Decide if we trust this key
- If not, look at the signer of this key
- Decide if we trust them
- If not, look at the next person up the signing tree
- Repeat until we either trust one of these entities, or we hit a self
signed entry
So, to veryify a certificate, we need to trust someone in the key signing
chain. At the very top of the chain will be a self signed certificate (it
has to be, that's the chain termination). If OpenSSL gets to the end of
this chain without trusting anyone, and doesn't the self signed bit
either, then it can't verify the certificate. In this case, it'll give
an error like:
oxford-ca.pem: /C=GB/ST=Oxfordshire/L=Oxford/O=Oxford University/OU=Computing Services/CN=Oxford University Computing Services CA/Email=ca@computing-services.oxford.ac.uk
error 18 at 0 depth lookup:self signed certificate
What this says is that at 0 depth (i.e. the top of the signer tree), it
hit a self signed certificate, but this certificate wasn't trusted. Since
OpenSSL can't verify any of the signers of the certificate, it can't
verify the certificate. Since this is a fatal problem, it throws the
above error.
Once you get someone on the signing chain trusted, you'll get something
like:
oxford-herald2-server.pem: OK
The Cause
One of:
- A man in the middle attack, sending you an alternate certificate for
the server, which was signed by a different CA
- The server certificate is self signed and not trusted
- The server certificate is signed by a CA you don't trust (eg an
in-house one)
The Fix
- In this case, you have big problems. Still, it's a good thing that
OpenSSL gave you an error about it, rather than blindly trusting it
regardless, isn't it?
- Get the server certificate (if you haven't already), and
install it as a trusted
certificate
- Get the CA certificate, and
install it as a trusted CA
Written By:
Nick Burch
Last modified: Friday, 20-Jun-2003 23:30:21 BST
These pages are from http://www.gagravarr.org/writing/openssl-certs/
This work is licensed under a
Creative
Commons License.