如何使用 iPhone SDK 访问身份配置文件和证书?
我正在尝试使用用户通过打开电子邮件附加的 .cer / .p12 存储的证书/身份来验证我的应用程序上的用户身份。该证书显示在手机设置应用程序的“配置配置文件”组下。
有没有什么方法可以使用iphone SDK访问证书(我尝试使用安全框架,但似乎只能访问存储在应用程序钥匙串或来自其组的其他钥匙串中的证书)?
I am trying to verify the user identity on my application using a certificate / identity that the user has stored by opening a .cer / .p12 attached to an email. The certificate appears on the settings app of the phone under the group "Configuration Profiles".
Is there any way of accessing the certificate using the iphone SDK (I have tried to use the Security Framework, but it seems that it is only possible to access certificates stored in the application keychain or other keychains from its group)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已经谈到了安全框架,但是您尝试文档中的以下功能?
我个人从未尝试/不得不自己这样做,但无论如何,框架中似乎有一些像 SecCertificateCreateWithData 之类的函数,因此您应该能够从构建一个 SecCertificateRef一些 NSData/CFDataRef... 数据,这是您的邮件附件的内容。
从那里,您可以将其用作使用其他功能的任何其他证书(就像您对从钥匙串中提取的证书所做的那样)
这只是简单阅读文档后的猜测,但让我们尝试一下,因为文档似乎表明这是必经之路。
You talked about the Security framework already, but did you try the following functions in the doc?
I personally never tried/had to do this myself, but anyway it seems that there are some functions like
SecCertificateCreateWithData
in the framework, so you should be able to build aSecCertificateRef
from some NSData/CFDataRef… data which is the content of your mail attachment.From there you may use it as any other certificate using the other functions (like you would do for a certificate extracted from the Keychain)
Well this is only a guess after simply reading the documentation but let's give it a try as the doc seems to indicate it is the way to go.