NPKIGetServerCertificateStatus

Determines the status of the server certificate (formerly NWPKIGetServerCertificateStatus).

Syntax

    #include "npki.h"
    
    NWRCODE NPKIGetServerCertificateStatus(
       const NPKIContext     context,
       const unicode        *serverDN, 
       const unicode        *certificateName,
       pnuint32              flags);
    

Parameters

context
(IN) Specifies the NPKI context for the request.
serverDN
(IN) Specifies the FDN of the eDirectory server for which you want the status of a certificate. This must be a valid eDirectory server in the current tree.
certificateName
(IN) Specifies the certificate name that you want to get information about. This must be a valid certificate for the specified server.
flags
(OUT) Specifies the status of the server certificate.

Return Values

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

Remarks

The server certificate can be in one of five states:

  • KMO_EMPTY—The server certificate does not have a valid public-private key pair.
  • KMO_KEY_PAIR_PRESENT—The server certificate has a valid public-private key pair.
  • KMO_TRUSTED_ROOT_PRESENT—The server certificate has a valid public-private key pair and a valid trusted root.
  • KMO_CERTIFICATE_PRESENT—The server certificate has a valid public-private key pair, a valid trusted root, and a valid object certificate.
  • KMO_INVALID_STATE—The server certificate is in an invalid state.

See Also

NPKICreateServerCertificate, NPKIFindServerCertificateNames, NPKIGetCACertificates, NPKIServerCertificateName, NPKIStoreServerCertificates