NPKICreateTrustedRoot

Creates a Trusted Root object and stores the specified X.509 root (or CA) certificate in the eDirectory object (formerly NWPKICreateTrustedRoot).

Syntax

    #include "npki.h"
    
    NWRCODE NPKICreateTrustedRoot(
       const NPKIContext     context, 
       const unicode        *objectDN,
       const pnuint8         certificate,
       const nuint32         certificateLen);
    

Parameters

context
(IN) Specifies the NPKI context for the request.
objectDN
(IN) Specifies the eDirectory FDN of the Trusted Root object to be created. Trusted Root objects can be created only within Trusted Root containers.
certificate
(IN) Specifies the DER-encoded X.509 root (or CA) certificate you want to store in the Trusted Root object.
certificateLen
(IN) Specifies the size of the certificate.

Return Values

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

Remarks

Trusted Root containers along with Trusted Root objects provide a method of logically grouping, managing, and accessing X.509 root (CA) certificates within a directory service.

Trusted Root Objects can be created only within Trusted Root containers. Use NPKICreateTrustedRootContainer to create a Trusted Root container.

NOTE:For a sample implementation of this task, see CreateTrustedRoot.

See Also