Previous section.

Common Security: CDSA and CSSM
Copyright © 1997 The Open Group

NAME

CSSM_ObtainPrivateKeyFromPublicKey

SYNOPSIS

CSSM_RETURN CSSMAPI CSSM_ObtainPrivateKeyFromPublicKey (
    CSSM_CSP_HANDLE CSPHandle,
    const CSSM_KEY_PTR PublicKey,
    CSSM_KEY_PTR Private_Key);

DESCRIPTION

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.

PARAMETERS

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.

RETURN VALUE

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.

ERRORS

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.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.
You should also read the legal notice explaining the terms and conditions relating to the CDSA documentation.

Contents Next section Index