VMS Help  —  CDSA  CDSA_API, ObtainPrivateKeyFromPublicKey
 NAME
   ObtainPrivateKeyFromPublicKey,
   CSSM_CSP_ObtainPrivateKeyFromPublicKey,
   CSP_ObtainPrivateKeyFromPublicKey    - Convert public key to private
                                          key (CDSA)

 SYNOPSIS
   # include <cssm.h>

    API:
        CSSM_RETURN CSSMAPI CSSM_CSP_ObtainPrivateKeyFromPublicKey
        (CSSM_CSP_HANDLE CSPHandle
        const CSSM_KEY *PublicKey,
        CSSM_KEY_PTR PrivateKey)
    SPI:
        CSSM_RETURN CSSMCSPI CSP_ObtainPrivateKeyFromPublicKey
        (CSSM_CSP_HANDLE CSPHandle,
        const CSSM_KEY *PublicKey,
        CSSM_KEY_PTR PrivateKey)

 LIBRARY
   Common Security Services Manager library (CDSA$INCSSM300_SHR.EXE)

 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.

 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.

 NOTES
   The KeyData field of the CSSM_KEY structure is allocated by the
   CSP.  The application is required to free this memory using the
   CSSM_FreeKey() (CSSM API), or CSP_FreeKey() (CSP SPI), function
   or with the memory functions registered for the CSPHandle.

 RETURN VALUE
   A CSSM_RETURN value indicating success or specifying a particular
   error condition. The value CSSM_OK indicates success. All other
   values represent an error condition.

 ERRORS
   Errors are described in the CDSA technical standard.  See CDSA.

        CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND

 SEE ALSO
   Books

   Intel CDSA Application Developer's Guide (see CDSA)

   Other Help Topics
Close Help