rc_read_config - Man Page

Read the global config file.

Synopsis

#include <radcli/radcli.h>

rc_handle * rc_read_config(
    char const  *filename
);

Description

This is the primary way to initialise radcli. Loads the configuration file, initialises the transport (including TLS/DTLS handshake when applicable), and returns an opaque handle for use in subsequent calls. The format is compatible with radiusclient-ng and freeradius-client.

Standard RFC 2865/2866/2869 attributes are built into the library; the dictionary option is only needed for vendor-specific attributes.

Recognised configuration options:

secret: shared secret applied to authserver/acctserver when they don't already carry an inline :secret  the config-file equivalent of radcli_ctx_set_secret() (radcli2.h). Ignored when serv-type is tls or dtls: that transport uses its own fixed RFC 6614/7360 secret instead, so this option is never consulted.

namespace: Linux network namespace name to use for socket operations.

tls-psk-identity / tls-psk-key: Pre-Shared Key identity (plain text) and key (hex text), used instead of X.509 credentials; both must be set together. The config-file equivalent of radcli_ctx_set_tls_psk() (radcli2.h), and preferred over a psk@username@hexkey embedded in authserver's value.

require-message-authenticator: set to no to accept responses that lack the Message-Authenticator attribute. Enabled by default per draft-ietf-radext-deprecating-radius-10 (CVE-2024-3596 / BLAST RADIUS); only disable for legacy servers that predate RFC 3579. Has no effect over RADIUS/TLS or RADIUS/DTLS, where this mitigation is never enforced, per draft-ietf-radext-deprecating-radius-10 Section 4.

clientdebug: debug verbosity level (integer; 0 = off).

Parameters

filename

path to the configuration file.

Return Value

new rc_handle on success, NULL on failure.

See Also

rc_add_config(3), rc_apply_config(3), rc_check_tls(3), rc_conf_int(3), rc_conf_srv(3), rc_conf_str(3), rc_config_free(3), rc_config_init(3), rc_destroy(3), rc_dict_free(3), rc_find_server_addr(3), rc_get_socket_type(3), rc_get_srcaddr(3), rc_getport(3), rc_mksid(3), rc_new(3), rc_openlog(3), rc_own_hostname(3), rc_read_dictionary(3), rc_read_dictionary_from_buffer(3), rc_setdebug(3), rc_test_config(3), rc_tls_fd(3)

Info

2026-09-03 radcli Radius client library