CodeSigning IPA File Using Only Windows

For a future project, I need to find out how the encoding process for Apple iOS IPA files (iPhone / iPad) works. The goal of my project will be to create (in Delphi) a Windows tool for encoding a single IPA file (previously compiled using "Do not Code Sign" via Xcode).

One certainty is that it is only possible to encode an IPA file on Windows; as Adobe does with AIR / Flash CS5. In addition, Epic Games, Inc. built UDK (Unreal Development Kit) with a third-party tool for encoding IPA files.

This last one was encoded in C # /. NET, so I tried to study the source code to find out how the coding process works, but wow, the code is quite developed and even if between C # / there is a significant similarity between .NET and Delphi, I quickly blur ...

The UDK iPhonePackager is really close to what I want to do (with less features).

From my research: certificates and keys can be "generated" through OpenSSL on the command line; Apple uses X509 certificates for encoding binary code (?); a component such as the Bouncy Castle Crypto API can be used to manage certificates.

An interesting article about the process of creating codes from Apple: http://developer.apple.com/library/mac/#technotes/tn2206/_index.html

I will also have to generate "CodeResources"; "embedded.mobileprovision" from the Mobile Provisioning file; and "CodeSignature / CodeResources" with a hierarchy of all files, such as:

<key>MainWindow.nib</key> <data>GTBfZPINlJlD7HXjMRAKgfAztXU=</data> 

If you are still reading, you should definitely have a headache :)
So, below are a few questions to start ...

Is it possible to re-sign a binary file already compiled and signed with "Do not Code Sign"?
Do you think my project is really hard work?

Do you think I would be better off hiring a developer? I may have a budget for this project, but ideally I would like to do it myself, of course ...: D

Thanks a lot in advance for your tips and / or suggestions.

Beny

+7
source share
2 answers

I am working on a similar project, but I could not find the source files for the UDK tool, is it open source? If so, could you give me a link to it?

I can say that the CodeResources file uses the sha1 file in base64. You can create using openssl: openssl dgst -sha1 -binary | openssl enc -base64

+1
source

I wrote a tool for updating mobile software and abandoning IPA on Windows, the tool and its C # source code (licensed under LGPL) can be found.

+1
source

All Articles