Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I'm currently implementing a SSL-proxy, and have run into some problems regarding certificates.

We have a offline "Company Root CA", and an online "Company intermediate CA". On the proxy I have generated a "proxy intermediate CA", which again has been signed by our "Company intermediate CA".

All browsers trust both our root CA and our issuing CA.

When I go to a SSL site through the proxy, I get a certificate warning. When studying the certificate chain in the browser I see:

  • Proxy intermediate certificate
    • "fake" site certificate

If I import the Proxy intermediate CA into my certificate store, everything works fine. The certificate chain then looks like this when going to the site:

  • Company Root CA
    • Company intermediate CA
      • Proxy intermediate CA
        • "fake" site certificate

Why don't the browsers trust certificates issued by the proxy intermediate CA?

share|improve this question
    
to reply to sk0yern : Trust and Chain building are different things. As Tom said, some browsers require the complete chain to be send by the server, eventhough you have it locally. –  Vega Sep 27 at 22:33

1 Answer 1

The browser can use only the certificate that it knows of. In the case of SSL server certificates, there are three methods by which the browser will obtain the certificates needed to build a chain from a root that the browser trusts, down to the certificate to validate (in your case, the "fake"):

  • The browser may have a local copy of the certificates (in a store named "intermediate CA" or something like that).
  • The browser may follow the URL found in certificates themselves. A certificate may have an Authority Information Access extension, which may point (with a URL) to a place where may be found the certificate for the issuer of the certificate which contains the extension.
  • A SSL server is supposed to send its certificate as part of a fully grown chain.

The automatic download works only as long as the URL are present in the certificates, and the corresponding servers are reachable; moreover, to prevent nasty chicken-and-egg issues, the said URL shall be HTTP, not HTTPS. Not all browsers will do this download, though. It depends on the browser and also on the operating system, and their configuration. Some browsers will refuse to use anything else than the exact chain sent by the server.

So my guess is that your proxy, which acts as a SSL server, does not send a complete chain. It sends the "fake" certificate, and the "proxy intermediate CA", but not the "company intermediate CA". Thus, the browser lacks this last certificate and cannot build a complete chain.

To verify this, use OpenSSL (the command-line tool):

openssl s_client -connect www.aservername.com:443

This will print (among other information) the subject and issuer names for all certificates in the chain as sent by the server.

Alternatively, run some network monitor tool (e.g. Wireshark) to see the SSL Certificate message from the server, which contains the certificate chain from the server.

share|improve this answer
    
You are entirly correct. Wireshark tells me that the proxy sends the fake server certificate, and the proxy intermediate CA. But since my browser already trusts "company intermediate CA", doesn't it have the complete chain? –  sk0yern Oct 15 '13 at 18:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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