如何使用 iPhone SDK 访问身份配置文件和证书?

发布于 2024-08-15 11:52:04 字数 169 浏览 6 评论 0原文

我正在尝试使用用户通过打开电子邮件附加的 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧街凉风 2024-08-22 11:52:04

您已经谈到了安全框架,但是您尝试文档中的以下功能

我个人从未尝试/不得不自己这样做,但无论如何,框架中似乎有一些像 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 a SecCertificateRef 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文