The file is basically the public distribution key + Apple public certificate chain + allowed devices that can be installed on to - as long as the IPA file is likewise signed.
Your key is encoded in to the plist entry. and the binary data after the plist are the associated public certficates: the Apple Root public certificate (downloadable from Apple and the Apple iPhone Certification Authority (downloadable via your Apple portal).
[Updated based on comments]
The real goal is to work out the certificate "common name" used my the mobile provision file so that the app can be re-signed.
Inside the mobile provisioning file ApplicationIdentifierPrefix
tag contains the certificate UserID. This number could be used to find the certificate in the keychain tool.
So manually, the steps would be:
- Extract the
ApplicationIdentifierPrefix
number from the .mobileprovision file
- Open the keychain app. Look through each login/certificate to find the one with matching UserId
To automate the process
- run some fancy unix command to extract the ID
- run
security find-certificate -a >a.out
then grep for the ID. Then find the common name from the same record.
security
will not decode. – Unreconstructed