LDAP\_TLS(3) Library Functions Manual LDAP\_TLS(3)

# [NAME](#NAME)

ldap\_start\_tls, ldap\_start\_tls\_s, ldap\_tls\_inplace, ldap\_install\_tls - LDAP TLS initialization routines

# [LIBRARY](#LIBRARY)

OpenLDAP LDAP (libldap, -lldap)

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;ldap.h&gt;**

**int ldap\_start\_tls(LDAP \*ld);**

**int ldap\_start\_tls\_s(LDAP \*ld, LDAPControl \*\*serverctrls, LDAPControl \*\*clientctrls);**

**int ldap\_tls\_inplace(LDAP \*ld);**

**int ldap\_install\_tls(LDAP \*ld);**

# [DESCRIPTION](#DESCRIPTION)

These routines are used to initiate TLS processing on an LDAP session. **ldap\_start\_tls\_s**() sends a StartTLS request to a server, waits for the reply, and then installs TLS handlers on the session if the request succeeded. The routine returns **LDAP\_SUCCESS** if everything succeeded, otherwise it returns an LDAP error code. **ldap\_start\_tls**() sends a StartTLS request to a server and does nothing else. It returns **LDAP\_SUCCESS** if the request was sent successfully. **ldap\_tls\_inplace**() returns 1 if TLS handlers have been installed on the specified session, 0 otherwise. **ldap\_install\_tls**() installs the TLS handlers on the given session. It returns **LDAP\_LOCAL\_ERROR** if TLS is already installed.

# [SEE ALSO](#SEE_ALSO)

[**ldap**(3)](/man/enterprise-packages/openldap-2.6/ldap.3), [**ldap\_error**(3)](/man/enterprise-packages/openldap-2.6/ldap_error.3)

# [ACKNOWLEDGEMENTS](#ACKNOWLEDGEMENTS)

**OpenLDAP Software** is developed and maintained by The OpenLDAP Project &lt;http://www.openldap.org/&gt;. **OpenLDAP Software** is derived from the University of Michigan LDAP 3.3 Release.

2026/09/08 OpenLDAP 2.6.15

---

Document: ldap_tls_inplace(3) from openldap-2.6 2.6.15-r2 (Chainguard OS)
Source: https://git.openldap.org/openldap/openldap.git
