Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6174185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:42:31+00:00 2026-05-23T23:42:31+00:00

On our iOS projects, we commit to the version control repository both the signing

  • 0

On our iOS projects, we commit to the version control repository both the signing certificate and the provisioning profiles used to generate AdHoc and AppStore builds. This way, whenever a new developer downloads a new fresh copy of the app, he has everything he needs to create an AdHoc build for testers.

We are using Jenkins for Continous Integration, and I would like to have a script that does some sanity checks on the commited files. In particular, I’d like to check that the commited provisioning profiles were indeed generated with the signing certificate commited in the repository.

Does anyone know how to do this from the command line? I can’t figure out the .mobileprovision file format, although it seems to be a signed binary plist file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:42:33+00:00Added an answer on May 23, 2026 at 11:42 pm

    Answering my own question, I hope this helps someone else.

    Turns out, the mobileprovision file is a PKCS7 digitally signed message. It is not signed with the developer’s certificate, but with Apple’s one.

    However, the data that’s signed is an XML plist that contains the public key of the certificate you use to sign your binaries.

    So basically, the steps are as follows:

    1. Extract the data from the PKCS7 file.
    2. Extract the public-key from the p12 file.
    3. Compare the two, and check if they are the same.

    I managed to do this easily with Ruby, since it provides nice wrappers to OpenSSL. I left a script in Github, if anyone wants to use.

    The relevant parts of the code are as follows:

    profile = File.read(@profile_file)
    certificate = File.read(@certificate_file)
    
    p7 = OpenSSL::PKCS7.new(profile)
    cert = OpenSSL::PKCS12.new(certificate, @certificate_password)
    
    store = OpenSSL::X509::Store.new
    p7.verify([], store)
    
    plist = REXML::Document.new(p7.data)
    
    plist.elements.each('/plist/dict/key') do |ele|
      if ele.text == "DeveloperCertificates"
        keys = ele.next_element
        key = keys.get_elements('//array/data')[0].text
    
        profile_cert = "-----BEGIN CERTIFICATE-----" + key.gsub(/\t/, "") + "-----END CERTIFICATE-----\n"
    
        @provisioning_cert = OpenSSL::X509::Certificate.new(profile_cert)
      end
    end
    
    # Compare @provisioning_cert.to_s and cert.certificate.to_s
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When testing our iOS app, my team and I need to disable SSL certificate
In Obj-C / iOS. Our UI design calls for an initial screen with options
All crash reports submitted for our application on iOS 4.0 are giving the below
When we play our app on the device(ios 4.0 and above) and leave mid
Our app works fine on iOS 4.2 and 4.3. However, on iOS 3.2 it
Our site uses a great deal of JQuery, but on iOS effects such as
In our iOS app we have close to a hundred image files in resources
Our application server has a folder used to store attachments uploaded by customer. This
Our company is currently writing a GUI automation testing tool for compact framework applications.
Our team develops distributed winform apps. We use ClickOnce for deployment and are very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.