Closed microshine closed 6 years ago
there wasn't check for returned value from SecKeyCopyPublicKey
function in FillPublicKeyStruct
This makes it unnecessary to store the public key in the keychain. In the rare case of a failure, the function doesn’t create an error object, but the public key reference is nil. This might happen, for example, if the private key resides on a smart card that is no longer attached to the system, and is thus unavailable. source
@rmhrisk Should I hide such certificates and private keys?
We should not hide them but expose to the caller that this key doesn't have private key any longer
I've got this error for certificates from GlobalSign and StartCom. Certificates were installed from pfx
All private keys which throws error on SecKeyCopyPublicKey
don't have public key in KeyChain
App was crashed on
iPhone Developer
cert