0

We use a custom app which uses Matrix SSL (client side) to perform certificate validation on MAC and Linux systems. My question is, does Matrix SSL keep a cert store cache of intermediate and trusted roots so it can perform its checks against what the server sends? Or does it call up something like OCSP or use AIA extensions like browsers do in order to validate the chain? Or can Matrix SSL be developed to use both methods?

  • You wrote "does Matrix SSL keep a cert store cache of [...] trusted roots". At least the root CA cert (or a hash of it or something) must already be present on the client side. The idea is that one end of any cert chain is fixed. If both ends of the chain were unknown to the client, then there is no reason for the client to trust the server at all. – StackzOfZtuff Nov 30 '14 at 6:41
1

After having a look at the documentation of MatrixSSL I assume that:

  • Since it is transport layer agnostic it will not (and can not) retrieve missing intermediate certificates by itself. To do this it would need to have some kind of HTTP client (maybe with proxy support to) and I cannot see any such thing documented.
  • It will also not check by itself, that the hostname matches the certificate. You need to add your own certValidator to do this. If you don't verify the hostname in the certificate you will accept any certificate signed by a trusted CA for an arbitrary host, which will effectively leave you open to man-in-the-middle attacks. That means implementing this is a must, unless you need to check only against some fixed certificates (i.e. certificate pinning).
  • The API contains functions for CRL handling, but requires the developer to provide the CRL itself. It has function to get the URL for the CRL but the developer than has to retrieve the data for the URL by itself.
  • There is no documented API for OCSP. Since OCSP requires HTTP access and since MatrixSSL itself is transport agnostic it can be assumed, that it will not do OCSP lookups by itself and will also not give the developer the necessary information to do OCSP lookups.

At the end this is about the security you get from OpenSSL, i.e. no hostname checking, only manual CRL, no documented API for OCSP (although there is an undocumented but fairly complex API in OpenSSL).

Since you are using MatrixSSL only for your own custom app I would recommend to keep it simple and secure by only accepting few specific certificates which are controlled by you and which are hard-coded inside the application. In this case you would not need the more complex stuff like hostname or revocation checks.

0

I think you are confusing two things. For browers, as for any other TLS stack I can think of, the certificate chain validation will be done by checking certificates signatures untill it finds a certificate already in its trust store. (You can go in the Preferences/Options of your browser and check the default trusted CAs).

Then, in order to check revocation status, it'll either use CRL, OCSP, or just doesn't even bother as revocation is kind of broken anyway.

  • The context of my saying AIA was in the event a browser was trying to find and alternate path to a trusted root in the event that the local cert store was missing the required certs or the server presented a broken chain. Sorry - should have clarified. I'm just wondering how Matrix handles the validation piece and if its looking at a locally built store within itself or if it calls out via some protocol. – user53029 Aug 1 '14 at 16:12
  • Can you also explain what is meant when you say revocation is "kind of" broken? – user53029 Aug 1 '14 at 20:21

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.