Directory Services

ldap_stop_tls_s

The ldap_stop_tls_s function stops the encryption operation started by a call to ldap_start_tls_s.

BOOLEAN ldap_stop_tls_s(
  PLDAP ExternalHandle
);

Parameters

ExternalHandle
[in] A pointer to an LDAP structure that represents the current session.

Return Values

Returns TRUE if the function call succeeds. Returns FALSE if a bind is currently in progress on the connection, if the connection is not actively connected to the server, or if TLS (SSL) negotiation is in progress on the connection.

Remarks

The ldap_stop_tls_s function should only be called on a connection for which TLS (SSL) was established by using ldap_stop_tls_s. It should not be called on a TLS (SSL) connection established by some other function, such as ldap_sslinit. Any outstanding requests on the connection will be abandoned before TLS encryption is terminated. If this function fails, that is, returns FALSE, you must close the connection by using ldap_unbind or ldap_unbind_s, because the connection can be left in an indeterminate state.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 family and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows Me/98/95.
Unicode: Implemented as Unicode and ANSI on all platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

ldap_start_tls_s, Using Start-stop TLS Encryption