[转载]mac下查看.mobileprovision文件及钥匙串中证书.cer文件
一. mobileprovision文件查看
xxx.mobileprovision是ios开发中的设备描述文件,里面有证书信息、调试设备的UUID信息、bundle identifier等,此文件是二进制格式不能直接打开,那么如何查看其中信息呢
方法1 使用mac自带security命令行
用mac自带的命令security,cd到mobileprovision所在的文件夹,执行
security cms -D -i XXX.mobileprovision
会得到下面的dict结构的详细信息
<?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>
方案2 mobileprovision-read命令来实现
在Terminal下输入下面的命令并回车
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 -
这条命令的作用是下载mobileprovision-read的源码,然后编译,最后把生成的二进制文件mobileprovision-read
放入到/usr/local/bin/
路径下。
执行下面命令后,可以得到与上面dict展示一样的信息
mobileprovision-read -f xxx.mobileprovision
mobileprovision-read -f test.mobileprovision -o UUID
二. 钥匙串中证书.cer文件查看
钥匙串访问(keychain access.app)中断各种证书,如何查看他们的公钥和私钥信息呢,比如如下证书中的公私钥信息呢
需要右键将其导出成.p12文件,之后将.p12文件转成.pem文件,转成.pem的方法使用下面的命令
openssl pkcs12 -in xxx.p12 -out xxx.pem -nodes
openssl pkcs12 -in xxx.p12 -out xxx.pem -nodes -password pass:'xxxpasword'
之后用记事本打开xxx.pem文件,就能读到公钥私钥了
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=US
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
-----BEGIN CERTIFICATE-----
MIIFkDCCBHigAwIBAgIIasmZb9B0IcUwDQYJKoZIhvcNAQELBQAwg
IG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3Vt
XnbnM/N12EGccq7oH5WPQSOrcte5NxVFTdhT1mY7i4/7/Hf3N4n2gpjUUtykg8H4
jDQERpZHSbQYyHpcdiH6f9EsSXM+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/4QW9vx7wu54utXb22hh9P
XbNv81+NQUo+e1BRr5h6ueDPUQFunBscQ10CNQp6CEHgTntYXMT2P
9a9+2mLCLZxGpKSbmYwuD4Sf1dpXKSOBc5rtPzlul2uHLbx10MSJri4=
-----END RSA PRIVATE KEY-----
上面是查看钥匙串中的公钥和密钥,那么怎么查看.cer呢?可以将其双击安装到钥匙串中,再按上述方法查看。
参考
[转载]mac下查看.mobileprovision文件及钥匙串中证书.cer文件的更多相关文章
- mac下查看.mobileprovision文件及钥匙串中证书.cer文件
mac下查看.mobileprovision文件及钥匙串中证书.cer文件 一. mobileprovision文件查看 xxx.mobileprovision是ios开发中的设备描述文件,里面有证书 ...
- Mac 下查看网络端口占用情况
1.Mac 下查看网络端口占用情况 有的时候关闭了服务器,但是端口还是占用,解决的方法是 kill 掉占用该端口的进程. # 查看 8009 端口的占用情况 $ lsof -i:8009 可以看到,该 ...
- matlab从文件夹名中获得该文件夹下所图像文件名
function [s,nameC]=get_FileNameFromFolderPath(path) % 函数调用:[s,nameC]=get_FileNameFromFolderPath(path ...
- <转载>Mac下,使用sshpass让iterm2支持多ssh登录信息保存
windows里有个Xshell非常的方便好使,因为它能保存你所有的ssh登录帐号信息.MAC下并没有xshell,有些也提供这样的功能,但效果都不好.iterm2是很好的终端,但却不能很好的支持多p ...
- [转载] linux 下查看机器cpu是几核的
linux 下查看机器cpu是几核的 本文转自”映月的博客“:http://wurhuangfeng.blog.163.com/blog/static/35178241201111235829116/ ...
- [转载]mac下homebrew的使用
该文转自:https://www.zybuluo.com/phper/note/87055 mac系统也是基于unix的系统,所以也继承类很多unix的特性,包括软件的编译,安装等.ubuntu下有快 ...
- Mac安装7Z以及Mac下查看隐藏文件夹
一:Mac下安装7Z: 1:brew直接安装解压工具 $ brew search 7z 会搜索到: ==> Formulae p7zip 2:$ brew install p7zip ...
- mac 下终端 操作svn命令 以及出现证书错误的处理方法
首先,转载地址:http://hi.baidu.com/zhu410289616/item/eaaf160f60eb0dc62f4c6b0e 还有一个地址:http://www.cnblogs.com ...
- 转载:【学习之家】Python中__init__.py文件的作用
Python中__init__.py文件的作用详解 Python中__init__.py文件的作用详解 来源:学习之家 作者:xuexi110 人气:357 发布时间:2016-09-29 摘要:__ ...
随机推荐
- jquery的表单验证方法,一个function能不能同时捕捉点击事件和按键事件?能不能再优化下,有代码。
// 该jquery扩展引自 http://www.ghostsf.com/tools/389.html 方法名是作者博客的命名 $.fn.ghostsf_serialize = function ( ...
- 动态jdk启动项目
昨天遇到,服务器安装jdk1.7,但是springboot项目用jdk1.8编译的,所以需要指定jdk版本启动: nohup /root/jdk1.8.0_11/bin/java -jar /root ...
- [Java基础] Java对象内存结构
转载地址:http://www.importnew.com/1305.html 原文于2008年11月13日 发表, 2008年12月18日更新:这里还有一篇关于Java的Sizeof运算符的实用库的 ...
- python部署工具fabric
两台机器:10.1.6.186.10.1.6.159.fabric部署在10.1.6.186上面 1 执行和1相同的任务,不过排除掉10.1.6.159这台机器 1 #!/usr/bin/pytho ...
- [转]Configure a Package to Use Transactions SSIS
本文转自:http://msdn.microsoft.com/en-us/library/ms141144.aspx When you configure a package to use trans ...
- iOS:关于UIView切角的两种实现方式
转载自:http://www.jianshu.com/p/451b7fa94e2a 第一种: 我想你一见到代码,就瞬间有吐的冲动,最常用的一种方式... UIButton *button = [[UI ...
- [Python爬虫] 之十二:Selenium +phantomjs抓取中的url编码问题
最近在抓取活动树网站 (http://www.huodongshu.com/html/find.html) 上数据时发现,在用搜索框输入中文后,点击搜索,phantomjs抓取数据怎么也抓取不到,但是 ...
- Spark Streaming的PIDRateEstimator与backpressure
PIDRateEstimator是Spark Streaming用来实现backpressure的关键组件. 看了一些博客文章,感觉对它的解释都没有说到要点,还是自己来研究一下比较好. 首先,需要搞清 ...
- shorthand trick with boolean expressions
https://stackoverflow.com/questions/2802055/what-does-the-construct-x-x-y-mean --------------------- ...
- MyEclipse 集成 Gradle开发环境
一.上Grandle官网下载Gradle,地址:http://www.gradle.org/downloads 如果只是运行只下载gradle-2.6-bin.zip 就可以了,如果为了扩展开发的话就 ...