NPKIDeleteUserCertificate

Deletes a user’s certificate (formerly NWPKIDeleteUserCertificate).

Syntax

    #include "npki.h"
    
    NWRCODE NPKIDeleteUserCertificate(
       const NPKIContext    context, 
       const unicode       *userDN,
       const unicode       *nickName,
       const nuint32        flags,
       const pnuit8         certificate,
       const nuit32         certificateLength);
     
    

Parameters

context
(IN) Specifies the NPKI context for the request.
userDN
(IN) Specifies the FDN of a user object. This must be a valid eDirectory user object in the current tree.
nickName
(IN) Specifies the certificate nickname. This name is used to identify the key pair and associated certificate. It must be a valid certificate nickname for the specified user.
flags
(IN) This should currently be set to 0.
certificate
(IN) Specifies the DER-encoded X.509 certificate you want to delete.
certificateLength
(IN) Specifies the size of the certificate.

Return Values

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

Remarks

The certificate and certificateLength variables are used if there is no nickname for the user certificate. This can happen if the certificate was added through LDAP. If the nickname field has a value, certificate and certificateLength can be NULL.

WARNING:Deleting a certificate can have severe consequences such as the inability to read encrypted email or encrypted files.

See Also

NPKICreateUserCertificate, NPKIFindUserCertificates