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.

10.3 Using Root Certificates<br />

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

You want to do certificate validation, but you need the correct certificates from the<br />

certification authorities you intend to support.<br />

Solution<br />

The certificates that you need can be obtained from the authority themselves, but<br />

unfortunately, many CAs do not make them easy to get. OpenSSLincludes several of<br />

the more common root CA certificates, but it is not a complete collection. Popular<br />

web browsers such as Internet Explorer for Windows also allow you to export the<br />

certificates they contain.<br />

A much more in-depth survey of all the common root certificates (particularly the<br />

ones found in Microsoft’s Internet Explorer) is available in the Root Report, available<br />

for sale from the PKI Laboratory (http://www.pkiclue.com).<br />

Discussion<br />

You should either obtain certificates directly from the CA over a<br />

trusted medium or check the fingerprints of certificates you find on<br />

the net or in your browser against fingerprints published in a trusted<br />

source. You can do this by calling the CA, or you can compare against<br />

the fingerprints published in this book.<br />

Table 10-1 lists information about the root certificates for several prominent CAs.<br />

The information was collected from Internet Explorer for Windows, but it contains<br />

only those CAs that also publish CRLs. You can download these certificates (in PEM<br />

format) from the book’s web site, but be sure to check the fingerprint of the certificate<br />

against the fingerprint listed in this book. To check the fingerprint using the<br />

OpenSSL command-line tool, use the command:<br />

openssl x509 -fingerprint -noout -in cert.pem<br />

where cert.pem is the name of the file containing the certificate that you wish to<br />

check.<br />

Note that most CAs have multiple certificates, so you should figure out what type of<br />

certificate is right for your application. Generally, CAs will have at least one type of<br />

certificate intended for secure servers. They may also have “personal” certificates for<br />

user identification and even multiple types of personal certificates. Be sure to check<br />

the description to figure out which certificates are relevant to your application.<br />

Because most certificates eventually expire, there may be multiple root certificates of<br />

the same type from the same CA at one time. For example, for a few years, VeriSign<br />

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

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.<br />

Using Root Certificates | 519

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

Saved successfully!

Ooh no, something went wrong!