
I haven't managed to get a signed application running in Flash Debugger or on hardware yet - I suspect the header is wrong - but seeing as the demo application has a different header structure to what the header generator creates, and both have generally conflicting information, I need to find some better resources.
If you want to sign applications from C? via Wappsign, this wrapper around the COM object might be useful. You'd use it like this:
// Sign the app (where BinaryFile is the filename of the .hex file to sign)try { AppSigner Signer = new AppSigner(AppSigner.Mode.DetectType); // Get the key file string KeyFile = Signer.GetKeyFile(BinaryFile); if (KeyFile == "") throw new Exception("Couldn't find the key file."); // Get the output filename string SignedAppFilename = Signer.FormatOutput(BinaryFile); if (SignedAppFilename == "") throw new Exception("Couldn't establish output filename."); // Sign the bugger int Signed = Signer.Sign(BinaryFile, KeyFile, SignedAppFilename); if (Signed != 0) throw new Exception(Signer.GetErrorMessage(Signed));} catch (Exception ex) { // Didn't work as it should DisplayError(ErrorType.Error, "Could not sign application: " + ex.Message);}
For work I have to write various functionality in a proprietary language. While it's quite effective the designers didn't see fit to include descriptive error messages.
My favourites are:
"Syntax Error" + dump of all code to screen
"Link Failure" + dump of all code to screen
"Expected Expression" + dump of all code to screen
Along with lots of neat features like varying syntax depending on the structure of your code. The best I've got for 100 lines of code so far is 1 typo... but it takes 5-10 minutes to fix because it's so hard to find.
Things are getting better though as they improve the core products.