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.

are updated periodically and should be downloaded frequently to avoid stale information.<br />

Most CAs issue CRLs. (See Recipes 10.10 and 10.11 for details on where to<br />

look for CRLs and how to obtain them.) Another solution is to interactively ask the<br />

CA using the OCSP. (We discuss this protocol in Recipe 10.12.)<br />

In general, a certificate is verified against a collection of other certificate material—<br />

that is, CA certificates and CRLs. To verify a certificate, all of the certificates in the<br />

chain must be known. Trusted certificates are certificates that are known to be valid<br />

without having to perform signature verification on them; however, they could be<br />

invalid for other reasons, as we will soon see. Untrusted certificates can also be<br />

present in the hierarchy, in which case they must also be verified using trusted certificates.<br />

There must always be at least one trusted certificate at the root of the hierarchy.<br />

If there is not, the certificate cannot be considered valid.<br />

All certificates in the certification path must be checked to ensure they are valid for<br />

their assigned date. Every certificate has a beginning and an ending date for their<br />

validity period, and if the current date is outside that range, the certificate cannot be<br />

considered valid. Most people who have any familiarity with certificates usually realize<br />

that certificates expire, but many do not realize that they can have validity dates<br />

into the future and will not necessarily be valid yet at the point when they are presented.<br />

Finally, you must check every certificate in the certification path to ensure that it has<br />

not been revoked. Revocation status can be checked using a CRLor by consulting an<br />

OCSP responder. It is best to be able to handle both types of revocation checks<br />

because one or the other may not always be available or reliable.<br />

Once the validity of every certificate in the certification path has been verified, the<br />

basic verification tests are complete, but you are not done yet! You have only established<br />

that the certificate was issued by a CA that you trust, is within its valid period,<br />

and has not been revoked. Nothing has been done to verify that the entity that presented<br />

it to you is actually the entity that owns it. The details of how to do this vary,<br />

but in the most common case of a server presenting a certificate to a client, the hostname<br />

of the server should be embedded in the certificate. The hostname in the certificate<br />

can be compared to the hostname of the server that presented it (see Recipe 10.8).<br />

If the hostnames do not match, the certificate should not be trusted.<br />

In situations where it isn’t feasible to perform full certificate verification, an alternative<br />

is to compare the certificate against a list of known good certificates. See Recipe<br />

10.9 for a discussion of how to do this.<br />

See Also<br />

Recipes 10.8, 10.9, 10.10, 10.11, 10.12<br />

524 | Chapter 10: Public Key Infrastructure<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!