VERIFYSERVERCERT (Compact 2013)

3/26/2014

This callback function is an application-defined function. The server calls this function to allow a client to evaluate the certificate chain of the server to which it is connected. The VERIFYSERVERCERT name for this function is a placeholder for the function name defined by the application.

Syntax

typedef BOOLEAN (_cdecl VERIFYSERVERCERT) (
  PLDAP Connection,
  PCCERT_CONTEXT pServerCert
);

Parameters

  • Connection
    [in] Session handle.
  • pServerCert
    [in] Server's certificate.

Return Value

If the function succeeds (the client approves the server certificate), the return value is TRUE.

If this function fails, the return value is FALSE and the connection with a security infrastructure is severed.

Remarks

This callback function allows the client to verify the certificate of the server. The client registers a callback, which is invoked after the connection with a security infrastructure is set up. The server certificate is presented to the client, which invokes it and decides whether it is acceptable. To register this callback, call ldap_set_option (conn, LDAP_OPT_SERVER_CERTIFICATE, &CertRoutine), where CertRoutine is the address of your callback function.

The server calls this callback function after the connection with a security infrastructure has been established. The certificate of the server is supplied for examination by the client.

Requirements

Header

winldap.h

Library

wldap32.lib

See Also

Reference

LDAP Callback Functions
ldap_set_option