mac下查看.mobileprovision文件及钥匙串中证书.cer文件
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>--31T04::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>--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></integer>
<key>UUID</key>
<string>1c38459f-7xxxxxe286351</string>
<key>Version</key>
<integer></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
二. 钥匙串中证书.cer文件查看
钥匙串访问(keychain access.app)中断各种证书,如何查看他们的公钥和私钥信息呢,比如如下证书中的公私钥信息呢
需要右键将其导出成.p12文件,之后将.p12文件转成.pem文件,转成.pem的方法使用下面的命令
openssl pkcs12 -in xxx.p12 -out xxx.pem -nodes
之后用记事本打开xxx.pem文件,就能读到公钥私钥了
Bag Attributes
friendlyName: iPhone Developer: Ning xx (3Q73CFK5RP)
localKeyID: F0 BF 9E FD 7D 7E 2B 0F 5B F2 C5 1F BC 0D
subject=/UID=RNG8K5DALX/CN=iPhone Developer: Ning xx (xxxx)/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-----
xxxxx
IG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3Vt
XnbnM/N12EGccq7oH5WPQSOrcte5NxVFTdhT1mY7i4//Hf3N4n2gpjUUtykg8H4
jDQERpZHSbQYyHpcdiH6f9EsSXM+bA1a5yEpPL0zUJJSgCXR
-----END CERTIFICATE-----
Bag Attributes
friendlyName: xx
localKeyID: F0 BF 9E FD 7D 7E 2B 0F 5B F2 C5 1F BC 0D
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文件
一. mobileprovision文件查看 xxx.mobileprovision是ios开发中的设备描述文件,里面有证书信息.调试设备的UUID信息.bundle identifier等,此文件是 ...
- Mac 下查看网络端口占用情况
1.Mac 下查看网络端口占用情况 有的时候关闭了服务器,但是端口还是占用,解决的方法是 kill 掉占用该端口的进程. # 查看 8009 端口的占用情况 $ lsof -i:8009 可以看到,该 ...
- matlab从文件夹名中获得该文件夹下所图像文件名
function [s,nameC]=get_FileNameFromFolderPath(path) % 函数调用:[s,nameC]=get_FileNameFromFolderPath(path ...
- Mac安装7Z以及Mac下查看隐藏文件夹
一:Mac下安装7Z: 1:brew直接安装解压工具 $ brew search 7z 会搜索到: ==> Formulae p7zip 2:$ brew install p7zip ...
- java基础知识3--如何获取资源文件(Java中获取资源文件的url)
java开发中,常见的resource文件有:.xml,.properties,.txt文件等,后台开发中经常用到读取资源文件,处理业务逻辑,然后返回结果. 获取资源文件的方法说明getResourc ...
- mac 下终端 操作svn命令 以及出现证书错误的处理方法
首先,转载地址:http://hi.baidu.com/zhu410289616/item/eaaf160f60eb0dc62f4c6b0e 还有一个地址:http://www.cnblogs.com ...
- 文件类型分类:头文件dirent.h中定义的文件类型与linux内文件符号对应关系
头文件 dirent.h 定义了文件类型: enum{ DT_UNKNOWN = 0, //未知类型 DT_FIFO = 1, //first in, ...
- input type file onchange上传文件的过程中,同一个文件二次上传无效的问题。
不要采用删除当前input[type=file]这个节点,然后再重新创建dom这种方案,这样是不合理的.解释如下:input[type=file]使用的是onchange去做,onchange监听的为 ...
- 导出证书Cer文件为Pem格式的步骤
(1)先导出Push Services的证书,比如我们命名为“magic_cert.p12”,注意导出时会让你输入密码. (2)再导出Push Services证书的密钥(Private Key),比 ...
随机推荐
- .NET面试题系列[7] - 委托与事件
委托和事件 委托在C#中具有无比重要的地位. C#中的委托可以说俯拾即是,从LINQ中的lambda表达式到(包括但不限于)winform,wpf中的各种事件都有着委托的身影.C#中如果没有了事件,那 ...
- 一种简单的CQRS架构设计及其实现
一.为什么要实践领域驱动? 近一年时间我一直在思考一个问题:"如何设计一个松耦合.高伸缩性.易于维护的架构?".之所以有这样的想法是因为我接触的不少项目都是以数据库脚本来实现业务逻 ...
- WPF - 属性系统 (3 of 4)
依赖项属性元数据 在前面的章节中,我们已经介绍了WPF依赖项属性元数据中的两个组成:CoerceValueCallback回调以及PropertyChangedCallback.而在本节中,我们将对其 ...
- CSharpGL(19)用glReadPixels把渲染的内容保存为PNG图片(C#)
CSharpGL(19)用glReadPixels把渲染的内容保存为PNG图片(C#) 效果图 本文解决了将OpenGL渲染出来的内容保存到PNG图片的方法. 下载 CSharpGL已在GitHub开 ...
- 【初学者指南】在ASP.NET MVC 5中创建GridView
介绍 在这篇文章中,我们将会学习如何在 ASP.NET MVC 中创建一个 gridview,就像 ASP.NET Web 表单中的 gridview 一样.服务器端和客户端有许多可用的第三方库,这些 ...
- ABP源码分析三十九:ABP.Hangfire
ABP对HangFire的集成主要是通过实现IBackgroundJobManager接口的HangfireBackgroundJobManager类完成的. HangfireBackgroundJo ...
- stanford corenlp的TokensRegex
最近做一些音乐类.读物类的自然语言理解,就调研使用了下Stanford corenlp,记录下来. 功能 Stanford Corenlp是一套自然语言分析工具集包括: POS(part of spe ...
- linux安装mvn后提示权限不够
Maven - 环境配置 Maven 是一个基于 Java 的工具,所以要做的第一件事情就是安装 JDK. 系统要求 项目 要求 JDK Maven 3.3 要求 JDK 1.7 或以上Maven 3 ...
- SQL Server 动态行转列(参数化表名、分组列、行转列字段、字段值)
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 实现代码(SQL Codes) 方法一:使用拼接SQL,静态列字段: 方法二:使用拼接SQL, ...
- 实践 Neutron FWaaS - 每天5分钟玩转 OpenStack(118)
前面我们学习了 FWaaS 的理论知识,今天将通过实验来学习 FWaaS. 在我们的实验环境中,有两个 instance: cirros-vm1(172.16.100.3) 和 cirros-vm2( ...