
By Alain Thibodeau – Consultant
AIR and mobile applications need to be signed. Most of the time we use the same self-signed certificate to package our applications. There are times when you may want to use a different self-signed certificate or create one on the fly. This is possible using ADT and ANT.
Adobe’s documentation states the ADT certificate command use like this:
adt -certificate -cn name -ou orgUnit -o orgName -c country -validityPeriod years key-type output password
To incorporate with ANT we would do something like this:
Properties file:
cert.keystore=mycertificate.p12
cert.name=SelfSignedCertificate
cert.orgunit=Software Development
cert.orgname=newyyz
cert.country=CA
cert.keytype=2048-RSA
cert.password=mypassword
Build file:
<target name=”generate.certificate”>
<exec executable=”${ADT}”>
<arg value=”-certificate” />
<arg value=”-cn” />
<arg value=”${cert.name}” />
<arg value=”-ou” />
<arg value=”${cert.orgunit}” />
<arg value=”-o” />
<arg value=”${cert.orgname}” />
<arg value=”-c” />
<arg value=”${cert.country}” />
<arg value=”${cert.keytype}” />
<arg value=”${cert.keystore}” />
<arg value=”${cert.password}” />
</exec>
</target>
You can find more information here: http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d128fc240122-7ffc.html