![]() |
The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
|
Start TLS asynchronously. More...
#include <freeradius-devel/ldap/base.h>#include <freeradius-devel/util/debug.h>
Include dependency graph for start_tls.c:Go to the source code of this file.
Data Structures | |
| struct | fr_ldap_start_tls_ctx_t |
| Holds arguments for the start_tls operation. More... | |
Functions | |
| static void | _ldap_start_tls_io_error (UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, UNUSED int fd_errno, void *uctx) |
| Error reading from or writing to the file descriptor. | |
| static void | _ldap_start_tls_io_read (fr_event_list_t *el, UNUSED int fd, UNUSED int flags, void *uctx) |
| Event handler for the response to the StartTLS extended operation. | |
| static void | _ldap_start_tls_io_write (fr_event_list_t *el, int fd, UNUSED int flags, void *uctx) |
| Send an extended operation to the LDAP server, requesting a transition to TLS. | |
| int | fr_ldap_start_tls_async (fr_ldap_connection_t *c, LDAPControl **serverctrls, LDAPControl **clientctrls) |
| Install I/O handlers for Start TLS negotiation. | |
| static void | ldap_start_tls_handshake (UNUSED fr_event_list_t *el, fr_ldap_start_tls_ctx_t *tls_ctx) |
| Run the TLS handshake to completion. | |
Start TLS asynchronously.
Definition in file start_tls.c.
| struct fr_ldap_start_tls_ctx_t |
Holds arguments for the start_tls operation.
Definition at line 34 of file start_tls.c.
Collaboration diagram for fr_ldap_start_tls_ctx_t:| Data Fields | ||
|---|---|---|
| fr_ldap_connection_t * | c | The current connection. |
| LDAPControl ** | clientctrls | Controls to pass to the client (library). |
| int | msgid | |
| LDAPControl ** | serverctrls | Controls to pass to the server. |
|
static |
Error reading from or writing to the file descriptor.
| [in] | el | the event occurred in. |
| [in] | fd | the event occurred on. |
| [in] | flags | from kevent. |
| [in] | fd_errno | The error that occurred. |
| [in] | uctx | Connection config and handle. |
Definition at line 50 of file start_tls.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Event handler for the response to the StartTLS extended operation.
Once the server has agreed to StartTLS, run the TLS handshake.
| [in] | el | the event occurred in. |
| [in] | fd | the event occurred on. |
| [in] | flags | from kevent. |
| [in] | uctx | Connection config and handle. |
Definition at line 228 of file start_tls.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Send an extended operation to the LDAP server, requesting a transition to TLS.
Behind the scenes ldap_start_tls calls:
ldap_extended_operation(ld, LDAP_EXOP_START_TLS, NULL, serverctrls, clientctrls, msgidp);
| [in] | el | the event occurred in. |
| [in] | fd | the event occurred on. |
| [in] | flags | from kevent. |
| [in] | uctx | Connection config and handle. |
Definition at line 265 of file start_tls.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_ldap_start_tls_async | ( | fr_ldap_connection_t * | c, |
| LDAPControl ** | serverctrls, | ||
| LDAPControl ** | clientctrls | ||
| ) |
Install I/O handlers for Start TLS negotiation.
| [in] | c | connection to StartTLS on. |
| [in] | serverctrls | Extra controls to pass to the server. |
| [in] | clientctrls | Extra controls to pass to libldap. |
Definition at line 345 of file start_tls.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Run the TLS handshake to completion.
libldap before 2.6.9 can't resume a TLS handshake, so the socket is put back into blocking mode, and this call blocks the thread until the handshake completes or fails. Build against libldap 2.6.9 or later to avoid this.
| [in] | el | unused. |
| [in] | tls_ctx | of the StartTLS operation. Always freed. |
Definition at line 191 of file start_tls.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.9.8