NPKIFindKeyGenServersForUser

Finds the servers that can be used to generate a public/private key pair (that is, a certificate) for the users that reside in the specified name context (formerly NWPKIFindKeyGenServersForUser).

Syntax

    #include "npki.h"
    
    NWRCODE NWPKFindKeyGenServersForUser(
       const NPKIContext    context,
       const unicode       *nameContextDN,
       pnuint32              numberOfServers); 
    

Parameters

context
(IN) Specifies the NPKI context for the request.
nameContextDN
(IN) Specifies the FDN context of the users for which you want to find a key generation server. This must be a valid container in the current tree.
numberOfServers
(OUT) Returns the number of servers with a read/write or master replica of the partition in which the user object resides.

Return Values

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

Remarks

The requirements for a server to generate a key pair for a user are:

  • The server must hold a read/write or master replica of the partition in which the user object resides.
  • The server must be running the correct version of the Novell Certificate Server.

NPKIFindKeyGenServersForUser finds all of servers that meet the first requirement. Call NPKIGetServerInfo to determine if the selected server meets the second requirement. When a successful call to NPKIFindKeyGenServersForUser is made, the server names are stored in context specific values that can be accessed by calling NPKIServerNames.

NOTE:Multiple calls to NPKIServerNames are necessary if more than one server name is available.

See Also