NPKIGetHandleToUserKey

Returns a NICI Object handle to a user key, specified by nickname (formerly NWPKIGetHandleToUserKey).

Syntax

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

Parameters

context
(IN) Specifies the NPKI context for the request.
nickname
(IN) Points to the certificate nickname that identifies which key to be referenced. nickname must be a valid certificate nickname for the currently logged-in user in the current tree. The corresponding private key must be stored in eDirectory.
ccsCtx
(IN) Specifies the NICI context. You must create and destroy this context.
pkiKeyHandle
(OUT) Points to the handle to the NICI object for the private key specified by the nickname.

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 call the pkiKeyHandle contains a NICI object handle to the private key that can then be passed into other NICI calls to encrypt, decrypt or verify data.

See Also

NPKIFindUserCertificates, NPKIReadAllNickNames