iOS移动设备管理安装配置文件失败

3

我正在尝试设置从我的设备到服务器的MDM签到连接。在我的.mobileconfig文件中,我已经放置了身份标识,该标识来自凭证,我是通过密钥链访问和使用.p12文件生成的。对于服务器和签到URL-https://address.To.Server:9769/mdm/

我在Tomcat中启用了SSL来托管我的服务器,我使用keytools生成JKS-"keytool -importkeystore-srckeystore client-cert.p12-srcstoretype PKCS12-destkeystore keystore.jks"

* client-cert.p12与我放在移动配置的identity.p12文件相同。

如果我没记错,所有从IOS到服务器的请求都使用HTTP PUT方法。我已经尝试从chrome浏览器直接访问我的服务器,并没有任何问题。我相信这是证书问题,但我不知道发生了什么。

当我尝试从safari安装配置文件时,我得到了所有这些错误。

>Notice: (Error) MC: Connection to <server> failed with error: NSError:
Desc   : The server certificate for <server> is invalid.
US Desc: The server certificate for <server> is invalid.
Domain : MCHTTPTransactionErrorDomain
Code   : 23002
Type   : MCFatalError
Params : (
"<server>"
)

>Notice: (Error) MC: Cannot install MDM Mobile Device Management. Error: NSError:
Desc   : The payload Mobile Device Management could not be installed.
Sugg   : The server certificate for <server> is invalid.
US Desc: The payload Mobile Device Management could not be installed.
US Sugg: The server certificate for <server> is invalid.
Domain : MCInstallationErrorDomain
Code   : 4001
Type   : MCFatalError
Params : (
"Mobile Device Management"
)

>Desc   : The profile SilverlakeMDM could not be installed.
Sugg   : The payload Mobile Device Management could not be installed.
US Desc: The profile SilverlakeMDM could not be installed.
US Sugg: The payload Mobile Device Management could notbe installed.
Domain : MCProfileErrorDomain
Code   : 1009
Type   : MCFatalError
Params : (
SilverlakeMDM
)

以下内容来自我的服务器控制台:
>httpsConnector.receiver.02 ERROR DefaultSystemExceptionStrategy:300 logException - Caught exception in Exception Strategy: Received close_notify during handshake
javax.net.ssl.SSLException: Received close_notify during handshake
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1868)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1821)
        at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1922)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1059)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1294)
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:848)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:69)
        at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
        at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
        at org.mule.transport.http.HttpServerConnection.readLine(HttpServerConnection.java:219)
        at org.mule.transport.http.HttpServerConnection.readRequest(HttpServerConnection.java:185)
        at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:155)
        at org.mule.work.WorkerContext.run(WorkerContext.java:311)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
2个回答

1
可能存在的问题包括:
  1. 首先检查您的CN。它应该与域名匹配。如果您在本地机器上进行测试,请确保将IP添加到其中。

  2. 确保您的SSL证书是由根CA签名的,如果是自签名的,则签名者应明确指示为根CA。

  3. 如果您使用RA证书,则还需要由根CA签名。

  4. 将checkin和server urls实现为PUT方法。如果未实现此功能,则会出现错误。

我之前也遇到过这个问题,是由于第4点引起的,最终解决了它。


你好,你们在用什么服务器进行MDM?起初我们使用的是专用服务器,但现在我们正在转移到Microsoft Azure。所以当我们安装它时,配置文件安装失败了(Profile Installation Failed),尽管之前一直都没问题。据我所知,可能是Azure对PUT请求有问题。你有任何想法吗?我们是否需要创建新的证书? - Imran
现在我只是WSO2 EMM的开发人员。这将与WSO2 EMM一起工作。 - Dilshan

0

很可能,它所提到的问题就是:“服务器证书无效。”。

也许不是根证书(我不确定iOS会不会喜欢这样),或者你在这个证书中使用了一些桌面支持但iOS设备不支持的不寻常内容。

尝试从你的iOS设备上的Safari访问你的服务器,看看它会说什么。

此外,我假设你创建了一个配置文件,并安装了服务器证书。进入“偏好设置”并查看此配置文件。该证书应该显示为“受信任”。


我能够使用iPad Safari访问https链接,但证书被标记为不受信任,因为它是自签名证书。对于配置文件,我使用IPCU生成,并将从钥匙串访问生成的.p12插入到IPCU中的身份部分。由于“<server>的服务器证书无效”,我无法安装该配置文件。顺便问一下,我生成证书的方法正确吗?我很困惑。 - soniality
首先,忽略我关于证书是否受信任的评论。我刚在iOS界面上查看了一下,似乎它不会指示每个证书的状态,而是指示整个配置文件的未签名/已验证状态。 - Victor Ronin
关于证书生成。只是为了确保我们在同一页面上。IPCU中的凭据项目允许添加两种东西之一:1).cer(这将使iOS设备信任服务器证书)。2)PKCS12-它是设备身份证书(它是设备用于对服务器进行身份验证的证书和私钥)。最终,如果您的服务器具有自签名密钥,则应安装服务器证书+(PKCS12或SCEP)。 - Victor Ronin
如果我没记错的话,苹果下载中有一些配置文件用于诊断,其中之一是用于诊断MDM错误的。您可以安装此配置文件,在这种情况下,它可能会为您提供有关错误的更多信息。 - Victor Ronin
根据这里的答案http://stackoverflow.com/a/10905901/2695014,我的CN应该是address.To.Server:9769/mdm/还是address.To.Server:9769?是否需要根据我的服务器地址设置CN? - soniality
显示剩余2条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接