Radcli library 1.3.1
A simple radius library
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
TLS/DTLS API

TLS and DTLS related functions. More...

Macros

#define DEFAULT_DTLS_SECRET   "radius/dtls"
 
#define DEFAULT_TLS_SECRET   "radsec"
 
#define TIME_ALIVE   120
 

Typedefs

typedef struct tls_int_st tls_int_st
 
typedef struct tls_st tls_st
 

Functions

int rc_tls_fd (rc_handle *rh)
 
int rc_check_tls (rc_handle *rh)
 

Detailed Description

TLS and DTLS related functions.

Note that, that API is for improving TLS and DTLS support in an application. Applications are not required to use this API to support them. TLS and DTLS support can be enabled by the administrator transparently from the radiusclient configuration file.

Macro Definition Documentation

◆ DEFAULT_DTLS_SECRET

#define DEFAULT_DTLS_SECRET   "radius/dtls"

Definition at line 52 of file tls.c.

◆ DEFAULT_TLS_SECRET

#define DEFAULT_TLS_SECRET   "radsec"

Definition at line 53 of file tls.c.

◆ TIME_ALIVE

#define TIME_ALIVE   120

Definition at line 393 of file tls.c.

Function Documentation

◆ rc_check_tls()

int rc_check_tls ( rc_handle *  rh)

Check established TLS/DTLS channels for operation

This function will check whether the channel(s) established for TLS or DTLS are operational, and will re-establish the channel if necessary. If this function fails then the TLS or DTLS state should be considered as disconnected. It must be called at a time when the sessions are not in usage (e.g., in a different thread).

Note: It is recommended to run this function periodically if you have a DTLS channel since an undetected server reset may result to a black hole behavior of the server.

Parameters
rha handle to parsed configuration
Returns
0 on success, -1 on error

Definition at line 464 of file tls.c.

◆ rc_tls_fd()

int rc_tls_fd ( rc_handle *  rh)

Returns the file descriptor of the TLS/DTLS session

This can also be used as a test for the application to see whether TLS or DTLS are in use.

Parameters
rha handle to parsed configuration
Returns
the file descriptor used by the TLS session, or -1 on error

Definition at line 433 of file tls.c.