21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

digest = EVP_sha1( );<br />

fingerprint_length = sizeof(fingerprint);<br />

spc_fingerprint_cert(cert, digest, fingerprint, &fingerprint_length);<br />

/* use the fingerprint to compare against the list of known cert fingerprints */<br />

10.10 Obtaining Certificate Revocation Lists with<br />

OpenSSL<br />

<strong>Problem</strong><br />

You have a certificate that you want to verify, as well as the certificate that was used<br />

to issue it, but you need to check the issuing authority’s CRLto make sure that the<br />

certificate has not been revoked. We cover how to use a CRLonce you have it in<br />

Recipe 10.5—but how do you get it in the first place?<br />

Solution<br />

All CAs should publish a CRLfor each certificate used for issuing certificates, but<br />

many do not seem to. In fact, most CAs make it very difficult to find the CRLs they<br />

do publish, so it is easy to come to the conclusion that they do not publish a CRLat<br />

all. It turns out that some CAs do not publish a CRL, but the most prominent of CAs<br />

all do. Unfortunately, the CAs that do make it easy to find their CRLs are in the<br />

minority. We have spent a sizable amount of time attempting to track down CRLs<br />

for each of the certificates we have listed in Recipe 10.3, as well as numerous others<br />

with which we had no success. We have also managed to find many CRLs for which<br />

we were unable to find matching issuing certificates, but we have omitted them here.<br />

Many of them can be found at http://www.openvalidation.org.<br />

Note that many CAs require acceptance of a licensing agreement before you’re<br />

allowed to download their CRLs. You should make sure to check the information<br />

that we provide here before you use it, to ensure that you have the legal right to use<br />

the data and that the CA has not changed the location of their URLs since this book<br />

went to press. We have found many certificates that contain cRLDistributionPoints<br />

extensions in them where the URLwas no longer valid. It may be that the URLs are<br />

invalid because no CRLhas ever been issued; however, to avoid any possible confusion,<br />

it would be better for these CAs to issue an empty CRL.<br />

Discussion<br />

To obtain a CRL, first check the certificate and its issuing certificate for a<br />

cRLDistributionPoints extension that contains a URI GeneralName. This extension is<br />

defined in RFC 3280, and it specifies a way for CAs to communicate the location of<br />

Obtaining Certificate Revocation Lists with OpenSSL | 547<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!