CSP_ObtainPrivateKeyFromPublicKey
CSSM_RETURN CSSMSPI CSP_ObtainPrivateKeyFromPublicKey (
CSSM_CSP_HANDLE CSPHandle,
const CSSM_KEY_PTR PublicKey,
CSSM_KEY_PTR Private_Key);
Given a public key this function returns a reference to the private key. The private key and its associated passphrase can be used as an input to any function requiring a private key value.
- CSPHandle (input)
The handle that describes the module to perform this operation.
- PublicKey (input)
The public key corresponding to the private key being sought.
- PrivateKey (output)
A reference to the private key corresponding to the public key.
A CSSM return value. This function returns CSSM_OK if successful, and returns an error code if an error has occurred. Use CSSM_GetError to obtain the error code.
- CSSM_CSP_PRIKEY_NOT_FOUND
Corresponding private key not found.
- CSSM_CSP_MEMORY_ERROR
Not enough memory to allocate.
- CSSM_FUNCTION_NOT_IMPLEMENTED
Function not implemented.
Contents | Next section | Index |