我正在设置一个 MDM 供应商并拥有相同的苹果企业帐户。但是在完成所有步骤后,当我尝试在 iPhone 上安装 iPhone 配置实用程序文件时遇到问题。我们收到警报说“配置文件安装失败”。请提出您怀疑可能有误的地方。以下是我创建配置文件所遵循的步骤。
对于供应商:
我在名为
vendor.csr
的 macbook 上创建了供应商 CSR。电子邮件:我的企业帐户电子邮件。
通用名称:我的公司名称。
保存到磁盘。
上传了
vendor.csr
文件到企业账户,并从企业账户下载了mdm.cer
文件。将此证书加载到 key 链。
将 .p12 文件导出为
private.p12
文件。使用命令提取私钥:
openssl pkcs12 -in private.p12 -nocerts -out key.pem
提取的证书:
openssl pkcs12 -in private.p12 -clcerts -nokeys -out cert.pem
将证书转换为 des 格式:
openssl x509 -in cert.pem -inform PEM -out mdm.cer -outform DES
8.从私钥中剥离密码:openssl rsa -in key.pem -out private.key
对于客户:
现在我从同一台名为 push.csr 的 macbook 创建了另一个用于推送的 csr。
电子邮件:公司支持电子邮件。
通用名称:公司名称推送
保存到磁盘。
Python 代码:
链接:https://github.com/grinich/mdmvendorsign
我从上面的链接中获取了 python 代码,以从上面生成的文件中获取 plist 编码文件,即 private.key、push.csr、mdm.cer
。我根据以下文件重命名了我的文件下面的命令并生成一个 plist 编码文件。
命令: python mdm_vendor_sign.py --csr user_submitted_CSR.csr --key mdm_vendor_private.key --mdm mdm_certifiate_from_apple.cer
推送证书:
然后我在“https://identity.apple.com/pushcert/”上传了一个plist编码的文件” 并从那里下载生成的推送证书。
安装下载到 key 链的pushcert并以p12格式导出并命名为mdm.p12。
将 mdm.p12 转换为 PEM 格式:openssl pkcs12 -in mdm.12 -out pushcert.pem -nodes
iPhone 配置实用程序:
我实现了 iPCU 的三个部分。对于服务器设置,我使用 RapidSSL 进行服务器设置。
一般
一个。名称 : My Company Private Limited
标识符:com.mycompany.mdm.profile
组织:我的公司名称
描述:版本 1.0
安全性:始终。
证书
上传了push cert最后一步生成的pushcert.pem文件。
移动设备管理
一个。服务器网址:https://xyz.server
b checkin 网址:https://xyz.checin
主题:com.apple.mgmt.External.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
身份:从凭证中选择。
导出 iPCU -> 无/SignConfigurationProfile(都试过了)。
现在,当我通过邮件发送此文件时,该文件无法安装到设备上,并且收到配置文件安装失败的消息。我从日志中了解到,该设备无法连接到服务器。请告诉我怎么办我解决了。
设备日志:
Nov 27 19:02:21 iPhone profiled[114] <Notice>: (Note ) MC: Checking for MDM installation...
Nov 27 19:02:21 iPhone profiled[114] <Notice>: (Note ) MC: ...finished checking for MDM installation.
Nov 27 19:02:21 iPhone profiled[114] <Notice>: (Note ) MC: Beginning profile installation...
Nov 27 19:02:21 iPhone profiled[114] <Error>: SecTrustEvaluate [leaf AnchorTrusted]
Nov 27 19:02:23 iPhone locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Nov 27 19:02:24 iPhone locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Nov 27 19:02:24 iPhone profiled[114] <Error>: SecTrustEvaluate [leaf AnchorTrusted]
Nov 27 19:02:26 iPhone profiled[114] <Notice>: (Error) MDM: Cannot Authenticate. Error: NSError:
Desc : A connection to the server could not be established.
US Desc: A connection to the server could not be established.
Domain : MCHTTPTransactionErrorDomain
Code : 23001
Type : MCFatalError
Params : (
"https://mdm.myCompanyName.com/Service1.svc",
500
)
Nov 27 19:02:26 iPhone profiled[114] <Notice>: (Error) MC: Cannot install MDM “Mobile Device Management”. Error: NSError:
Desc : The payload “Mobile Device Management” could not be installed.
Sugg : A connection to the server could not be established.
US Desc: The payload “Mobile Device Management” could not be installed.
US Sugg: A connection to the server could not be established.
Domain : MCInstallationErrorDomain
Code : 4001
Type : MCFatalError
Params : (
"Mobile Device Management"
)
...Underlying error:
NSError:
Desc : A connection to the server could not be established.
US Desc: A connection to the server could not be established.
Domain : MCHTTPTransactionErrorDomain
Code : 23001
Type : MCFatalError
Params : (
"https://mdm.myCompanyName.com/Service1.svc",
500
)
Nov 27 19:02:26 iPhone profiled[114] <Notice>: (Error) MC: Rolling back installation of profile “com.myCompanyName.mdm.profile”...
Nov 27 19:02:26 iPhone profiled[114] <Notice>: (Error) MC: Installation of profile “com.myCompanyName.mdm.profile” failed with error: NSError:
Desc : The profile “myCompanyName” could not be installed.
Sugg : The payload “Mobile Device Management” could not be installed.
US Desc: The profile “myCompanyName” could not be installed.
US Sugg: The payload “Mobile Device Management” could not be installed.
Domain : MCProfileErrorDomain
Code : 1009
Type : MCFatalError
Params : (
"myCompanyName"
)
最佳答案
您使用 Apple 的 MDM 供应商证书生成的证书不用于设备身份验证。它用于特定服务器向 APNs 发送通知。
iPCU 中的标识(很久以前就弃用了)用于客户端证书。另请记住,所有 TLS 证书都必须有效且受信任。您的服务器使用 HTTP 500 拒绝客户端,因此我将开始调查服务器日志以了解原因。
实际上,如果您正在开发自己的 MDM 解决方案,我会向 Apple 发起 DTS 事件。 API 文档仅发布给企业开发人员计划中的人员,不公开提供。 Apple 开发者论坛的 MDM 部分可能比这里更适合讨论它。
关于ios - iOS SDK 中的 MDM iPCU 配置文件安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27172802/