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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

XML signature validation in AIR<br />

Derefer<strong>en</strong>cing URIs in <strong>en</strong>veloping and detached signatures<br />

Adobe AIR 1.5 and later<br />

Wh<strong>en</strong> the signed data is located in the same docum<strong>en</strong>t as the signature itself, the URIs in the refer<strong>en</strong>ces typically use<br />

XPath or XPointer syntax to address the elem<strong>en</strong>ts that are signed. The W3C Recomm<strong>en</strong>dation for XML Signature<br />

Syntax and Processing only recomm<strong>en</strong>ds this syntax, so you should base your implem<strong>en</strong>tation on the signatures you<br />

expect to <strong>en</strong>counter (and add suffici<strong>en</strong>t error checking to gracefully handle unsupported syntax).<br />

The signature of an AIR application is an example of an <strong>en</strong>veloping signature. The files in the application are listed in<br />

a Manifest elem<strong>en</strong>t. The Manifest elem<strong>en</strong>t is addressed in the Refer<strong>en</strong>ce URI attribute using the string,<br />

“#PackageCont<strong>en</strong>ts”, which refers to the Id of the Manifest elem<strong>en</strong>t:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

ZMGqQdaRKQc1HirIRsDpeBDlaElS+pPotdziIAyAYDk=<br />

<br />

<br />

cQK...7Zg==<br />

<br />

<br />

MII...T4e<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

0/oCb84THKMagtI0Dy0KogEu92TegdesqRr/clXct1c=<br />

<br />

<br />

<br />

<br />

P9MqtqSdqcqnFgeoHCJysLQu4PmbUW2JdAnc1WLq8h4=<br />

<br />

<br />

<br />

<br />

OliRHRAgc9qt3Dk0m0Bi53Ur5ur3fAweIFwju74rFgE=<br />

<br />

<br />

<br />

<br />

A derefer<strong>en</strong>cer for validating this signature must take the URI string containing, "#PackageCont<strong>en</strong>ts" from the<br />

Refer<strong>en</strong>ce elem<strong>en</strong>t, and return the Manifest elem<strong>en</strong>t in a ByteArray object. The “#” symbol refers to the value of an<br />

elem<strong>en</strong>t Id attribute.<br />

Last updated 6/6/2012<br />

865

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

Saved successfully!

Ooh no, something went wrong!