A certificate consists of a public key, identifying information,
and possibly one or more certificates belonging to the issuing certification
authority.
There are two ways to establish trust in a certificate. You can
establish trust by obtaining a copy of the certificate directly
from the signer, for example on physical media, or through a secure
digital transmission such as an SSL transaction. You can also rely
on a certification authority to determine whether the signing certificate
is trustworthy.
To rely on a certification authority, the signing certificate
must be issued by an authority that is trusted on the computer upon
which the signature is validated. Most operating system manufacturers
place the root certificates of a number of certification authorities
into the operating system trust store. Users can also add and remove
certificates from the store.
Even if a certificate is issued by a trusted certification authority,
you must still decide whether the certificate belongs to someone
you trust. In many use cases, this decision is passed along to the
end-user. For example, when an AIR application is installed, the
AIR installer displays the identifying information from the publisher’s
certificate when asking the user to verify whether they want to
install the application. In other cases, you might have to compare
the public key or other certificate information to a list of acceptable
keys. (This list must be secured, perhaps by its own signature,
or by storing in the AIR encrypted local store, so that the list
itself cannot be tampered with.)
Note:
While you can elect to trust the signing certificate without
independent verification—such as when a signature is “self-signed”—you
do not thereby gain much assurance of anything by verifying the
signature. Without knowing who created a signature, the assurance
that the signature has not been tampered with, is of little, if any,
value. The signature could be a validly signed forgery.
Certificate expiration and revocation
All certificates expire. Certificates can also be revoked by
the issuing certification authority if, for example, the private
key related to the certificate is compromised or stolen. If a signature
is signed with an expired or revoked certificate, then the signature
will be reported as invalid unless a timestamp has been included
as part of the signature. If a timestamp is present, then the XMLSignatureValidator class
will validate the signature as long as the certificate was valid
at the time of signing.
A timestamp is a signed digital message from a timestamp service
that certifies that the data was signed at a particular time and
date. Timestamps are issued by timestamp authorities and signed
by the timestamp authority’s own certificate. The timestamp authority
certificate embedded in the timestamp must be trusted on the current
machine for the timestamp to be considered valid. The XMLSignatureValidator
does not provide an API for designating a different certificate
to use in validating the timestamp.