NPKIStoreServerCertificates
Stores server certificates after a successful call to NPKICreateServerCertificate (formerly NWPKIStoreServerCertificates). (Being deprecated.)
#include "npki.h" NWRCODE NPKIStoreServerCertificates( const NPKIContext context, const unicode *serverDN, const unicode *certificateName, const nuint32 flags, const nuint32 trustedRoot, const pnuint8 certificate, const nuint32 certificateLen, void *reserved1, void *reserved2);
NOTE:The flags PKI_CHAIN_CERTIFICATE, PKI_TRUSTED_ROOT_CERTIFICATE, and PKI_SELF_SIGNED_CERTIFICATE are mutually exclusive. In addition, PKI_OBJECT_KEY_CERTIFICATE and PKI_TRUSTED_ROOT_CERTIFICATE are also mutually exclusive.
NOTE:This is the default flag developers typically should use.
NOTE:If PKI_NOVELL_CERTIFICATE is used, the developer's relying software must be configured to handle the Novell Security Attributes extension (see Section 4.16, X.509 Extensions).
NOTE:If the certificate parameter is not used, you must call NPKIGetCACertificates immediately before calling NPKIStoreServerCertificates.
Returns 0 if successful, or an eDirectory, PKI, or NetWare error code if not successful.
0x2222 93 07 Store Certificate
IMPORTANT:NPKIStoreServerCertificates is being deprecated because it can only handle a chain of two certificates. Use NPKICertificateList and NPKIStoreServerCertificatesFromCertificateList to replace NWPKIStoreServerCertificates.
Two of the three modes of calling NPKICreateServerCertificate require subsequent calls to NPKIStoreServerCertificates.
In the two server mode, after successfully calling NPKICreateServerCertificate, you should call NPKIGetCACertificates to retrieve the CA’s self-signed certificate. Then you should call NPKIStoreServerCertificates to store the certificates.
NPKIStoreServerCertificates combines the CA’s object certificate and certificate chain to form the certificate chain for the server.
In the external certificate authority mode, two calls to NPKIStoreServerCertificates should be made. One call should store the certificate chain and the other should store the newly created certificate. The certificates and certificateLen parameters provide the capability to send in a certificate to be stored.