View the certificate. cer file in the. leleprovision file and key string under mac, and mobileprovisioncer
View the certificate. cer file in the. leleprovision file and key string under mac. 1. view the mobileprovision File
Xxx. mobileprovision is a device description file in ios development. It contains Certificate Information, UUID information of the debugging device, and bundle identifier. This file cannot be opened directly in binary format. How can I view the information in this file?
Method 1 use the mac built-in security command line
Use the security Command provided by mac, cd to the folder where mobileprovision is located, and execute
security cms -D -i XXX.mobileprovision
The following dict structure is displayed.
<?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>2016-10-31T04:06:14Z</date> <key>Platform</key> <array> <string>iOS</string> </array> <key>DeveloperCertificates</key> <array> <data>MIIFkDCCBHigxxxxxxxxxxxxxxxxxxWnPvqA5L3daJ1NY43ZXn5t6oGiAMwmrf8tXE/qgUpR+JH3+BENoD2y/DiQBTOzyb/LBC/KwNrdR5J95xsg9O3x5hEP8A0c</data> </array> <key>Entitlements</key> <dict> <key>com.apple.developer.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.in-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>2017-10-31T04:06: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>
Solution 2: implement the mobileprovision-read command
Enter the following command under Terminal and press ENTER
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 mobileprovision-read source code, compile the code, and finally compile the generated binary file.mobileprovision-read
To/usr/local/bin/
Path.
After executing the following command, you can obtain the same information as the preceding dict display.
mobileprovision-read -f xxx.mobileprovision
Ii. view the certificate. cer file in the key string
Keychain access. app interrupts various certificates. How can I view their public and private key information, such as the public and private key information in the following certificates?
Right-click to export it to The. p12 file, convert the. p12 file to the. pem file, and convert it to The. pem file. Use the following command:
Openssl pkcs12-in xxx. p12-out xxx. pem-nodes
Then open the xxx. pem file in notepad to read the public key and private key.
Bag Attributes friendlyName: iPhone Developer: Ning Liu (3Q73CFK5RP) localKeyID: F0 BF 58 9E FD 88 7D 61 7E 41 2B 0F 5B F2 03 C5 1F BC 0D 16 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 58 9E FD 88 7D 61 7E 41 2B 0F 5B F2 03 C5 1F BC 0D 16 Key Attributes: <No Attributes>-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAvz/81SxGFOHWOlR6kC4vi+UO8o/4QW9vx7wu54utXb22hh9PXbNv81+NQUo+e1BRr5h6ueDPUQFunBscQ10CNQp6CEHgTntYXMT2P9a9+2mLCLZxGpKSbmYwuD4Sf1dpXKSOBc5rtPzlul2uHLbx10MSJri4=-----END RSA PRIVATE KEY-----
The above shows the public key and key in the key string. How can I view the. cer? You can double-click it to install it in the key string, and then follow the above method to view it.
Reference
1. Obtain the uuid of the mobileprovision file through the command line.
2. Mac Security tool usage Summary