iOS 签名 unsigned.mobileconfig 文件

iOS 签名 unsigned.mobileconfig 文件

通过 Apple 开发者账号签名
  • 查看可用于签名的 id
security find-identity -v -p codesigning
  • result:
1) 4E8D512C8480FAC679947D6E50190AE9BAB3E825 "3rd Party Mac Developer Application: Developer Name (DUCNFCN445)"
2) 8B0EBBAE7E7230BB6AF5D69CA09B769663BC844D "Mac Developer: Developer Name (DUCNFCN445)"
3) 4E8D512C8480AAC67995D69CA09B769663BC844D "iPhone Developer: App Developer (DUCNFCN445)"
4) 65E24CDAF5B3E1E1480818CA4656210871214337 "Developer ID Application: App Developer (DUCNFCN445)"
   4 valid identities found
  • 通过 security 签名
security cms -S -N "iPhone Developer: App Developer (DUCNFCN445)" -i mdm_template_profile.mobileconfig -o signed.mobileconfig
  • Python 脚本 ProfileSigner
python profile_signer.py -n "iPhone Developer: App Developer (DUCNFCN445)" sign mdm_template_profile.mobileconfig signed.mobileconfig
  • 通过 Apple Configurator 2 或 Hancock 等工具签名
通过 openssl 签名
openssl smime -sign -in unsigned.mobileconfig -out signed.mobileconfig -signer server.crt -inkey server.key  -certfile ca.crt -outform der -nodetach
unsigned.mobileconfig 通过 openssl 签名

注意:如果 signercertfile 不一一对应,就会出现 红色的 “尚未验证”

例如:

MDM 证书 “MDM Vendor: Shanghai XXXXX Information Technology Co. Ltd.”

Apple Inc. Root Certificate

正确的关系应该是:

“MDM Vendor: Shanghai XXXXX Information Technology Co. Ltd.”

Apple Worldwide Developer Relations Certification Authority

更多 Apple 官方证书下载

Apple PKI

你可能感兴趣的:(iOS 签名 unsigned.mobileconfig 文件)