|
Radcli library 1.5.2
A simple radius library
|
radcli is a C library for adding RADIUS authentication and accounting to an application in roughly 50 lines of code. All server addresses, credentials, and transport choices (UDP, TCP, TLS, DTLS) live in a single configuration file; the calling application needs no transport-specific code.
The normal call sequence is three steps:
The transport is selected entirely in the config file (serv-type = udp, tcp, tls, or dtls); no code changes are required to switch. TLS and DTLS additionally require certificate or PSK credentials to be set in the config file (tls-ca-file, tls-cert-file, tls-key-file). See radexample.c for a complete compilable example.
Programmatic configuration (without a file) is also possible using rc_new(), rc_config_init(), rc_add_config(), and rc_apply_config().
RADIUS (Remote Authentication Dial In User Service, RFC 2865/2866) is a protocol for carrying authentication, authorisation, and accounting information between a Network Access Server and a shared Authentication Server. radcli implements the client side, and is source-compatible with freeradius-client and radiusclient-ng.