How can I create a SecIdentity instance on iOS

I've created a p256 ec key in the SE, stored it in the keychain, and have a X.509 certificate for that key, now I want to create and store a SecIdentity item in the keychain on iOS. SecIdentityCreateWithCertificate is available on macOS only., so that is not an option. How am I supposed to create a SecIdentity without having that call available?

Answered by DTS Engineer in 802062022

If both the certificate and the private key that matches the public in that certificate are in the keychain, you should be fetch the identity using the SecItem API. We’ve recently been discussing this very topic on this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"Å

Accepted Answer

If both the certificate and the private key that matches the public in that certificate are in the keychain, you should be fetch the identity using the SecItem API. We’ve recently been discussing this very topic on this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"Å

How can I create a SecIdentity instance on iOS
 
 
Q