Monday, December 28, 2009

So I was able to use adl. This is fun, but really what I want to do is make air files. To do this, I need to use adt (the Air Development Tool), and I need a certificate.

Adt Without a Certificate

If you just use adt without specifying a certificate, you get an intermediate air file. The convention is to give such an intermediate file an airi extension; een if you don't, even if you call it an air file, it's still an intermediate file.

Do a

adt -prepare HelloWorld.air HelloWorld-app.xml HelloWorld.swf

and get



Making My Own Certificate with KeyChain Access

Now I tried making a certificate using my Mac's Keychain Access program. I found that I could not make it in the System Keychain. But I could make it in the login keychain and then move it to the System Keychain. Then, I can export it. I called it TedKubaska002.p12. When I try making an ai file with this certificate, I get an error. The HelloWorld.air file is not created.

newtricks:HelloworldplusCert ted$ adt -package -storetype pkcs12 -keystore TedKubaska002.p12 -tsa none HelloWorld.air HelloWorld-app.xml HelloWorld.swf
password:
Unknown or invalid signature algorithm.
newtricks:HelloworldplusCert ted$

Using the Sample Certificate in the Download

The example code for the TY book I am reading does come with a sample certificate called myCert.p12. I can use that.

newtricks:HelloworldplusCert ted$ adt -package -storetype pkcs12 -keystore myCert.p12 -tsa none HelloWorld.air HelloWorld-app.xml HelloWorld.swf
password:
newtricks:HelloworldplusCert ted$ ls *.air
HelloWorld.air
newtricks:HelloworldplusCert ted$

I get a HelloWorld.air file, and if I click on it in Finder, I get




Click on Install.




Click on Continue.




 

How to Make and Use My Own Self-Signed Certificate

But you know, what I really want is my own self-signed certificate. Here's how I can get that. I removed the HelloWorld.air to ensure that I'm getting a new one.

newtricks:HelloworldplusCert ted$ adt -certificate -cn TedsHome -ou TedsCB -o TedsHome -c US 2048-RSA TedKubaska003.p12 ted128
newtricks:HelloworldplusCert ted$ adt -package -storetype pkcs12 -keystore TedKubaska003.p12 -tsa none HelloWorld.air HelloWorld-app.xml HelloWorld.swf
password:
newtricks:HelloworldplusCert ted$ ls -l *.air
-rw-r--r-- 1 ted staff 404961 Dec 28 11:27 HelloWorld.air

To try our the new HelloWorld.air, first delete the HelloWorld.app that the last example put in /Applications. Then, if I click on the new HelloWorld.air, it acts like before. My self-signed certificate works ... just like the one I got in the example download.

What I find curious is why I couldn't make a working self-signed certificate with Mac's Key Chain application.



Air
12/28/2009 11:54:26 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |  Trackback
Related Posts:
Trying out Adobe Air

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):