SecIdentityCopyPrivateKey(_:_:)
Retrieves the private key associated with an identity.
Declaration
func SecIdentityCopyPrivateKey(_ identityRef: SecIdentity, _ privateKeyRef: UnsafeMutablePointer<SecKey?>) -> OSStatusParameters
- identityRef:
The identity object for the identity whose private key you wish to retrieve.
- privateKeyRef:
On return, points to the private key object for the specified identity. The private key must be of class type Privatekeyitemclass. In Objective-C, call the Cfrelease function to release this object when you are finished with it.
Mentioned in
Return Value
A result code. See Security Framework Result Codes.
Discussion
An identity is a digital certificate together with its associated private key.