NPKIStoreServerCertificatesFromCertificateList
Stores server certificates from an internal certificate chain structure.
#include "npki.h" NWRCODE NPKIStoreServerCertificatesFromCertificateList( const NPKIContext context, const unicode *serverDN, const unicode *certificateName, const nuint32 flags, const nuint32 trustedRootIndex, void *reserved1, void *reserved2);
Returns 0 if successful, or an eDirectory or PKI error code if not successful.
0x2222 93 07 Store Certificate
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.