iOS MDM Enrollment Profile Request of /profile to sign the certificate using java

我们两清 提交于 2019-12-06 23:34:27
Victor Ronin

Let me try to break down your question to multiple subquestion and answer the.

I am stuck at the very first point where we have to sign the certificate and send an SCEP.

Frankly, I wasn't able to understand what you are talking about.

Based on the response which you got, you are doing this: https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/iphoneotaconfiguration/OTASecurity/OTASecurity.html

And you are on phase 2, step 1.

I would first like to read the "Challenge" value and authenticate the certificate using challenge itself as it will be a uniquely identified session value for us

Again. I am not 100% sure what you mean. Specifically "authenticate the certificate using challenge itself"

You should do two things at this steps

  • Authenticate this request using the challenge extract from the request
  • Validate the signature (make sure that it's correct signature and that it's signed by appropriate Apple certificate).
  • if everything is correct (the challange and the certificate) then you should send either a profile with SCEP payload or PKCS12 payload

Please provide a java code which will help in parse this request.getInputStream. To read this part i used PKCS7 available for java from sun.security.pkcs package.

I would recommend to look at Bouncy Castle. It's excellent library which handles crypto.

And search for "Bouncy castle validate signature":

X.509 Certificate validation with Java and Bouncycastle

http://www.nakov.com/blog/2009/12/01/x509-certificate-validation-in-java-build-and-verify-chain-and-verify-clr-with-bouncy-castle/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!