NPKIGetHandleToServerKey

Obtains a NICI object handle to a server private key (formerly NWPKIGetHandleToServerKey).

Syntax

    #include "npkikey.h"
    
    NWRCODE NPKIGetHandleToServerKey(
       const NPKIContext    context,
       const unicode       *serverDN,
       const unicode       *certificateName,   
       NICI_CC_HANDLE       ccsCtx,   
       NICI_OBJECT_HANDLE  *pkiKeyHandle);
    

Parameters

context
(IN) Specifies the NPKI context for the request.
serverDN
(IN) Points to the DN of the server object.
certificateName
(IN) Points to the certificate nickname that identifies which key is to be referenced. certificateName must be a valid server certificate name the specified server.
ccsCtx
(IN) Specifies the NICI context you must create and destroy this context. This context must be created and destroyed by the caller.
pkiKeyHandle
(OUT) Points to the handle to the NICI object for the private key specified by certificateName.

Return Values

Returns 0 if successful, or an eDirectory, NICI, or PKI error code if not successful.

PKI NCPCalls

0x2222 93 09 Read Key

Remarks

After a successful return from this function, pkiKeyHandle contains a handle to a NICI object that can then be used in calling other NICI functions.

IMPORTANT:This function does not work unless it is called on the server for which the key was generated (that is, serverDN).

See Also

NPKIFindServerCertificateNames, NPKIServerCertificateName