See the. mobileprovision file and the certificate. cer file in the keychain under Mac

Source: Internet
Author: User
Tags begin rsa private key

View. mobileprovision file and Keychain certificate. cer file in a. mobileprovision file view

Xxx.mobileprovision is a device description file in iOS development, which contains certificate information, UUID information of debugging device, bundle identifier, etc., this file is binary format cannot be opened directly, then how to view the information in it?

Method 1 Use the Mac to bring security command line

Use the command that comes with your Mac SECURITY,CD to the folder where Mobileprovision is located, performing

Security Cms-d-I. xxx.mobileprovision

Will get the details of the DICT structure below

<?xml version="1.0"encoding="UTF-8"? ><! DOCTYPE plist Public"-//apple//dtd PLIST 1.0//en" "HTTP://WWW.APPLE.COM/DTDS/PROPERTYLIST-1.0.DTD"><plist version="1.0"><dict> <key>AppIDName</key> <string>xxxx</string> <key>ApplicationIdentifierPrefix</key> <array> <string>xxxx</string> </array> <key>CreationDate</key> <date> .-Ten-31t04: .:14z</date> <key>Platform</key> <array> <string>ios</string> </array> <key>DeveloperCertificates</key> <array> <data>miifkdccbhigxxx xxxxxxxxxxxxxxxwnpvqa5l3daj1ny43zxn5t6ogiamwmrf8txe/qgupr+jh3+benod2y/diqbtozyb/lbc/kwnrdr5j95xsg9o3x5hep8a0c </data> </array> <key>Entitlements</key> <dict> <key>com.apple.develop Er.pass-type-identifiers</key> <array> <string>xxxxx.*</string> </array> <key>keychain-access-groups</key> <array> <string>xxxxx.*</string> </array> <key>inter-app-audio</key> <true/> <key>Get-task-allow</key> <true/> <key>application-identifier</key> <string>8ybr4r554p.com.playcrab.heracles.dev</string> <key>com.apple.developer.healthkit</key> <true/> <key>com.apple.developer.ubiquity-kvstore-identifier</key> <string>8ybr4r554p.*</string> <key>com.apple.developer.ubiquity-container-identifiers</key> <array> <string>8ybr4r554p.*</string> </array> <key>com.apple.developer.associated-domains</key> <string>*</string> <key>com.apple.security.application-groups</key> <array> </array> <key>com.apple.developer.homekit</key> <true/> <key>com.apple.developer.team-identifier</key> <string>8ybr4r554p</string> <key>com.apple.external-accessory.wireless-configuration</key> <true/> <key>aps-environment</key> <string>development</string> <key>com.apple.developer.inch-app-payments</key> <array> </array> <key>com.apple.developer.default-data-protection</key> <string>nsfileprotectioncomplete</string> <key>com.apple.developer.networking.vpn.api</key> <array> <string>allow-vpn</string> </array> <key>com.apple.developer.siri</key> <true/> </dict> <key>ExpirationDate</key> <date> .-Ten-31t04: .:14z</date> <key>Name</key> <string>xxxx</string> <key>ProvisionedDevices</key> <array> <string>70daba5aefxxxxxb5cf04ec73a385d970</string> <string>d8c16f16ef33xxxxxx3aad0xxxa382a9e2</string> </array> <key>TeamIdentifier</key> <array> <string>8ybrxxxx54p</string> </array> <key>TeamName</key> <string>nxxxx</string> <key>TimeToLive</key> <integer>365</integer> <key>UUID</key> <string>1c38459f-7xxxxxe286351</string> <key>Version</key> <integer>1</integer></dict>

Scenario 2 Mobileprovision-read command to implement

Enter the following command under terminal and return to

Curl https://  raw.githubusercontent.com/0xc010d/mobileprovision-read/master/main.m | clang-framework Foundation- Framework Security-o/usr/local/bin/mobileprovision-read-x objective-c-

The purpose of this command is to download the source code of the Mobileprovision-read, then compile, and finally put the generated binary files into the mobileprovision-read /usr/local/bin/ path.

After executing the command below, you can get the same information as shown above Dict

Mobileprovision-read-f xxx.mobileprovision
Two. Certificate. cer file in Keychain view

Keychain Access (Keychain Access.app) interrupts various certificates, how to view their public and private key information, such as the following certificate in the public key information?

You need to right-click to export it to a. p12 file, and then convert the. p12 file to a. pem file, and then convert the. Pem method using the following command

OpenSSL pkcs12-in xxx.p12-out xxx.pem-nodes

After you open the Xxx.pem file with Notepad, you will be able to read the public key.

Bag Attributes friendlyname:iphone developer:ning Liu (3Q73CFK5RP) localkeyid:f0 BF -9E FD the7D A7E A2 b 0F 5B F2GenevaC5 1F BC 0D -subject=/uid=rng8k5dalx/cn=iphone developer:ning Liu (3Q73CFK5RP)/ou=8ybr4r554p/o=ning liu/c=Usissuer=/c=us/o=apple Inc./ou=apple Worldwide Developer relations/cn=Apple Worldwide Developer Relations Certification Authority-----BEGIN CERTIFICATE-----MIIFKDCCBHIGAWIBAGIIASMZB9B0ICUWDQYJKOZIHVCNAQELBQAWGIG9UIHROAXMGY2VYDGLMAWNHDGUGYNKGYW55IHBHCNR5IGFZC3VTXNBNM /n12egccq7oh5wpqsorcte5nxvftdht1my7i4/7/HF3N4N2GPJUUTYKG8H4JDQERPZHSBQYYHPCDIH6F9ESSXM+BA1A5YEPPL0ZUJJSGCXR-----END CERTIFICATE-----Bag Attributes Friendlyname:guan localkeyid:f0 BF -9E FD the7D A7E A2 b 0F 5B F2GenevaC5 1F BC 0D -Key Attributes:<no attributes>-----BEGIN RSA PRIVATE KEY-----Miiepqibaakcaqeavz/81sxgfohwolr6kc4vi+uo8o/4qw9vx7wu54utxb22hh9pxbnv81+nquo+e1brr5h6uedpuqfunbscq10cnqp6cehgtntyxmt2p9a9+2mlclzxgpksbmywud4sf1dpxksobc5rtpzlul2uhlbx10msjri4=-----END RSA PRIVATE KEY-----

The above is to view the public key and key in the keychain, then how to view the. cer? You can double-click it to install it in the keychain, and then view it as described above.

Reference

1. Command line get UUID for mobileprovision file

2.MAC Security Tool Usage Summary

See the. mobileprovision file and the certificate. cer file in the keychain under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.