如何使用iPhone SDK访问身份配置文件和证书? [英] How can I access identity profiles and certificates with iPhone SDK?

查看:175
本文介绍了如何使用iPhone SDK访问身份配置文件和证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用用户通过打开附加到电子邮件的.cer / .p12来存储的证书/身份验证我的应用程序上的用户身份。证书会显示在手机的设置应用程序的配置配置文件下。

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".

是否有任何方式使用iphone SDK访问证书(我试图使用安全框架,但似乎只能从其组中访问存储在应用程序钥匙串或其他钥匙串中的证书)?

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)?

推荐答案

您已经讨论过安全框架,但您是否在文档中尝试以下函数

You talked about the Security framework already, but did you try the following functions in the doc?

我个人从未尝试过/这个我自己,但无论如何似乎在框架中有一些函数 SecCertificateCreateWithData ,所以你应该能够建立一个 SecCertificateRef 从您的邮件附件的一些NSData / CFDataRef ...数据。

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 a SecCertificateRef from some NSData/CFDataRef… data which is the content of your mail attachment.

您可以使用它作为任何其他证书使用其他功能你可以为从Keychain提取的证书)

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.

这篇关于如何使用iPhone SDK访问身份配置文件和证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆