Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list certificates from the iPhone keychain inside my app?

Tags:

ios

iphone

ipad

I am creating an iPhone app where we want to use x.509 certificates for client authentication. The user can install their cert from an email... It shows up under Settings -> General -> Profiles... However I am unable to read these certificate from my app...

I want to provide an interface similar to provided by Junos Pulse VPN client... A configuration window listing all the certificates in the device keychain and let the user select their identity.

How do I go about achieving this???

like image 370
Nirmal Patel Avatar asked Feb 22 '23 19:02

Nirmal Patel


2 Answers

The Junos Pulse app is apparently getting its access via a VPN plugin which is a private API supplied by Apple on an invitation-only basis. That API is giving the app access to those certificates otherwise accessible only to built-in iOS apps like Safari.

Review the following which were very helpful when I was researching the topic: iOS get Configuration Profiles that are installed (Apple Development post linked in one of the answers) https://devforums.apple.com/message/660579#660579

like image 95
thematic Avatar answered Apr 09 '23 12:04

thematic


You cannot access that keychain. And, yes, use search.

From Apple Docs:

The iOS gives an application access to only its own keychain items.

Read more here: Keychain Services Programming Guide

like image 24
Nekto Avatar answered Apr 09 '23 14:04

Nekto