1.制作未签名的mobileconfig文件
方式1:使用“iPhone配置实用工具”软件(Windows的软件),进行制作
下载链接:https://dl.pconline.com.cn/download/387535-1.html
安装启动遇到的问题,及解决方式:
问题描述:iphone配置实用工具 找不到 apple mobile device support
解决方法:https://www.cnblogs.com/tofight/p/15532139.html
制作过程:
第一步 第二步 第三步方式2:使用文本编写,保存后缀名为mobileconfig格式
<?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>ConsentText</key>
<dict>
<key>default</key>
<!-- 同意信息 -->
<string>同意信息</string>
</dict>
<key>PayloadContent</key>
<array>
<dict>
<key>FullScreen</key>
<true/>
<key>Icon</key>
<data>
<!-- APP图标base64格式 -->
</data>
<key>IsRemovable</key>
<true/>
<key>Label</key>
<!-- APP名称 -->
<string>百度一下</string>
<key>PayloadDescription</key>
<string>Adds a Web Clip.</string>
<key>PayloadDisplayName</key>
<!-- APP名称需要修改 -->
<string>Web Clip (百度一下)</string>
<key>PayloadIdentifier</key>
<!-- 标识符 仅修改com.baidu.profile-->
<string>com.baidu.profile.webclip1</string>
<key>PayloadOrganization</key>
<!-- 描述文件名称下面副标题位置 -->
<string>baidu</string>
<key>PayloadType</key>
<string>com.apple.webClip.managed</string>
<key>PayloadUUID</key>
<string>6CE13D92-AD76-48F2-9813-41369A401CA0</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>URL</key>
<!-- 跳转URL -->
<string>https://www.baidu.com</string>
</dict>
</array>
<key>PayloadDescription</key>
<!-- 描述文件的描述信息 -->
<string>搜索引擎</string>
<key>PayloadDisplayName</key>
<!-- 描述文件的名称 -->
<string>百度</string>
<key>PayloadIdentifier</key>
<!-- 标识符 -->
<string>com.baidu.profile</string>
<key>PayloadOrganization</key>
<!-- 机构公司名称 -->
<string>baidu</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>BE2A2BFE-4489-457B-82DB-474D1BEDF0E5</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
注:注意修改参数等;APP图标是base64格式(宽高114px)
2.对未签名的mobileconfig文件进行签名。
①签名需要3个文件:
server.crt 服务器端用于签名的证书
server.key 服务器端用于签名的证书的秘钥
ca.crt 其他机构为服务器颁发的CA证书
免费域名的证书申请成功之后会有两个文件(一个.key, 一个.pem), 打开.pem文件, 提取信息:
前面的为server.crt;
-----BEGIN CERTIFICATE-----
*******
-----END CERTIFICATE-----
后面的为ca.crt;
-----BEGIN CERTIFICATE-----
*******
-----END CERTIFICATE-----
②利用openssl签名
openssl smime -sign -in unsigned.mobileconfig -out signed.mobileconfig -signer server.crt -inkey server.key -certfile ca.crt -outform der -nodetach
unsigned.mobileconfig 未签名的描述文件
signed.mobileconfig 签名后的描述文件
网友评论