21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In this recipe, we have used a number of functions from Recipes 9.1, 10.5, 10.7, and<br />

10.8. These functions provide us with network connectivity and certificate verification.<br />

We will only need the latter if we need to connect to an SSL-enabled web server<br />

to retrieve the CRL, and it will all be handled by the network connectivity functions.<br />

Note that we construct an X509_STORE object that contains any system-wide trusted<br />

certificates as well as the issuing certificate for which we’re getting the CRL. For simplicity,<br />

we assume that an SSL-enabled server that is serving the CRL will present this<br />

same certificate. In practice, however, that is not always a safe assumption. Our testing<br />

indicates that this assumption frequently holds true, but there is a problem: if we<br />

are retrieving the CRLfrom an SSL-enabled server, we have to trust that the peer’s<br />

certificate has not been revoked. Fortunately, this is a reasonably safe assumption for<br />

us to make here because if a CA’s signing certificate has been revoked for some reason,<br />

there are much bigger problems. *<br />

We have provided code here to retrieve CRLs using HTTP because it is simple to<br />

implement and is commonly used by CAs to distribute their CRLs; however, LDAP<br />

is also commonly used for CRLdistribution. Unfortunately, owing to the complexity<br />

of the solution, we don’t include a detailed discussion of that topic in this book.<br />

LDAP is commonly used instead of the Directory Access Protocol (DAP) simply<br />

because it is less cumbersome. Unfortunately, it lacks some of the features that make<br />

storing CRLs and other PKI objects in a directory attractive. In particular, LDAP<br />

does not support location transparency and uses referrals instead, but few LDAP client<br />

implementations actually support referrals correctly. Because of the lack of location<br />

transparency, LDAP does not scale as well as DAP, and it makes it more difficult<br />

for CAs to interoperate.<br />

From the standpoint of the client, using LDAP to retrieve CRLs adds complexity<br />

without much benefit over other, simpler protocols such as HTTP. We feel that it’s<br />

important to be aware of how common the use of LDAP is, and we leave it to you to<br />

decide whether to include support for it in your own programs.<br />

See Also<br />

• RFC 3280: Internet X.509 Public Key Infrastructure Certificate and Certificate<br />

Revocation List (CRL) Profile<br />

• Recipes 7.16, 9.1, 10.1, 10.3, 10.5, 10.7, 10.8<br />

* If the CA’s signing certificate has been revoked, it is still acceptable to trust the signature on the CRLif and<br />

only if the signing certificate is also in the list of revoked certificates. Unfortunately, if it is not, there is no<br />

way to know that the certificate has been revoked, so there is no choice but to accept it. If the CA’s signing<br />

certificate has been revoked because of a compromise of the certificate’s corresponding private key, the party<br />

responsible for the compromise could likely issue an invalid CRL. As you can see, this is a vicious circle and<br />

only serves to demonstrate the flaws in CRLs that we discuss in Recipe 10.1.<br />

Obtaining Certificate Revocation Lists with OpenSSL | 555<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!