13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

XML signature validation in AIR<br />

The id<strong>en</strong>tityStatus property<br />

Adobe AIR 1.5 and later<br />

The id<strong>en</strong>tityStatus property reports the status of the signing certificate. The value of this property dep<strong>en</strong>ds on<br />

several factors including:<br />

the cryptographic integrity of the certificate<br />

whether the certificate is expired or revoked<br />

whether the certificate is trusted on the curr<strong>en</strong>t machine<br />

the state of the XMLSignatureValidator object (such as whether additional certificates have be<strong>en</strong> added for building<br />

the trust chain, whether those certificates are trusted, and the values of the useSystemTrustStore and<br />

revocationCheckSettings properties)<br />

The id<strong>en</strong>tityStatus property can have the following values:<br />

valid — To be considered valid, the signing certificate must meet the following conditions:<br />

The signing certificate must be unaltered.<br />

The signing certificate must not be expired or revoked—except wh<strong>en</strong> a valid timestamp is pres<strong>en</strong>t in the<br />

signature. If the signature is timestamped, the certificate will be considered valid as long as it was valid at the<br />

time the docum<strong>en</strong>t was signed. (The certificate used by the timestamp service to sign the timestamp must chain<br />

to a trusted root certificate on the user’s computer.)<br />

The signing certificate is trusted. A certificate is trusted if the certificate is in the system trust store or chains to<br />

another certificate in the system trust store and you set the useSystemTrustStore property to true. You can<br />

also designate a certificate as trusted using the addCertificate() method of the XMLSignatureValidator<br />

object.<br />

The certificate is, in fact, the signing certificate.<br />

invalid — The certificate is expired or revoked—and no timestamp proving validity at the time of signing is<br />

pres<strong>en</strong>t—or the certificate has be<strong>en</strong> altered.<br />

unknown — If the certificate is not invalid, but is not trusted either. Self-signed certificates, for example, will be<br />

reported as unknown (unless explicitly trusted). The id<strong>en</strong>tityStatus is also reported as unknown if the verify()<br />

method has not completed without error or if the id<strong>en</strong>tity has not be<strong>en</strong> checked because the signature digest is<br />

invalid.<br />

The refer<strong>en</strong>cesStatus property<br />

Adobe AIR 1.5 and later<br />

The refer<strong>en</strong>cesStatus property reports the cryptographic integrity of the refer<strong>en</strong>ces in the SignedData elem<strong>en</strong>t of<br />

the signature.<br />

valid — If the computed digest of every refer<strong>en</strong>ce in the signature matches the corresponding digest recorded in<br />

the XML signature. A valid status indicates that the signed data has not be<strong>en</strong> altered.<br />

invalid — If any computed digest does not match the corresponding digest in the signature.<br />

unknown — If the refer<strong>en</strong>ce digests have not be<strong>en</strong> checked. The refer<strong>en</strong>ces are not checked if the overall signature<br />

digest is invalid or the signing certificate is invalid. If the id<strong>en</strong>tityStatus is unknown, th<strong>en</strong> the refer<strong>en</strong>ces are<br />

only checked wh<strong>en</strong> the refer<strong>en</strong>cesValidationSetting is validOrUnknown.<br />

Last updated 6/6/2012<br />

859

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

Saved successfully!

Ooh no, something went wrong!