NPKIStoreServerCertificatesFromCertificateList

Stores server certificates from an internal certificate chain structure.

Syntax

    #include "npki.h"
    
    NWRCODE NPKIStoreServerCertificatesFromCertificateList(
       const NPKIContext    context, 
       const unicode       *serverDN,
       const unicode       *certificateName,
       const nuint32        flags,
       const nuint32        trustedRootIndex,
       void                *reserved1,
       void                 *reserved2);
    

Parameters

context
(IN) Specifies the NPKI context for the request.
serverDN
(IN) Points to the distinguished name of the server.
certificateName
(IN) Points to the name of the certificate.
flags
(IN) Reserved Pass in zero.
trustedRootIndex
(IN) Specifies the index number of the trusted root.
reserved1
Reserved for future use.
reserved2
Reserved for future use.

Return Values

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

PKI NCP Calls

0x2222 93 07 Store Certificate

Remarks

Two of the three modes of calling NPKICreateServerCertificate require subsequent calls to NPKICertificateList and NPKIStoreServerCertificatesFromCertificateList. In the two server mode, after successfully calling NPKICreateServerCertificate, you should call NPKIGetCACertificates successfully to retrieve the CA’s self-signed certificate. Call NPKICertificateList to add the self-signed certificate to the list. Then call NPKICertInfo to retrieve the newly created server certificate. Next call NPKICertificateList to add it to the list, then call NPKIStoreServerCertificatesFromCertificateList to store the certificates.

NPKIStoreServerCertificatesFromCertificateList combines the CA’s object certificate and certificate chain to form the certificate chain for the server.In the external certificate authority mode, calls to NPKICertificateList should be made for each of the certificates to store the whole certificate chain from root to leaf. Then call NPKIStoreServerCertificatesFromCertificateList to store the newly formed chain to the KMO.

See Also

NPKICertificateList, NPKICertInfo, NPKICreateServerCertificate, NPKIGetCACertificates