Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Web Development

Code Signing in Adobe AIR


Timestamping and Longevity

Key pairs, as used for creating digital signatures, become less secure the older they are. The older they are, the more likely that the private key has been compromised. There is also more signed material with which to attack them and more time in which to execute the attack. Certificates are therefore assigned expiration dates to limit the lifespan of the keys they are associated with.

The expiration date doesn't apply to the time at which the signature is validated, but rather the time at which the signing occurs. So long as a signature is created while the certificate is valid, the resulting signature should not itself expire. Adobe AIR signing tools obtain a secure timestamp during the signing process. The timestamp, which itself contains yet another verifiable signature, proves the time at which the signature was created. Tools for creating AIR files won't permit signing with an expired certificate and, by default, won't permit signing if a secure timestamp cannot be created. Similarly, Adobe AIR installs an application only if its signature was created while the signing signature was valid.

Obtaining a secure timestamp requires contacting a timestamp server made available for this purpose. Adobe has partnered with Geotrust (www.geotrust.com) to make such a service freely available, and it is used by default by our tools.

If obtaining the timestamp fails then signing typically fails, but you can override this behavior and force signing to occur anyway. If you package using the adt command-line tool, you can also specify an alternate timestamp server using the -tsa <url> options. When encountering signatures without timestamps, however, Adobe AIR compares the current time—not the signing time—against the certificate expiration dates. If the certificate has expired, the AIR file will not be installable, even if it was signed while the certificate was still valid. So while this workflow may be useful, if you're unavoidably offline for a short period, you should also avoid ever releasing an application signed without a time-stamped signature.

Revocation Lists

Certificates are sometimes compromised. For example, they might be stolen or even issued to the wrong party. In these circumstances, the certification authority revokes the certificate by adding it to a revocation list. The revocation listed is hosted at a URL that was already embedded in the issued certificate. If you have a certificate, you already know where to go to check the correct revocation list.

Adobe AIR performs a revocation check when signing and when installing. When online, this generally prevents revoked certificates from being used. Certificate revocation lists cannot be checked directly when offline. Two steps are taken to reduce the chances of a revoked certificate being accepted merely because the user is offline while installing.

  1. If the developer is online while signing, the certificate revocation list for the signing certificate is embedded in the AIR file. In nearly all, cases this is sufficient to establish that a certificate was not revoked at the time it was signed, even if the installation happens offline.
  2. Adobe AIR caches revocation lists. When off-line, it consults this cache for the CRL required. Because most commercial signing certificates come from a small number of vendors with a small number of revocation lists, there is a reasonably good probability that the cache contains useful data.

Revocation, like signing, is also impacted by time. If a timestamp is available, then the revocation list is checked to see if the certificate was revoked at the time signing occurred. If no timestamp is available, the revocation check is applied to the time at which the application is being installed.

Finally, Adobe AIR's revocation checks are best-effort based. If no relevant CRL can be obtained—whether through the cache, AIR file, or CRL server—the installation is allowed to proceed.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.