---
name: "rc_read_config"
section: "3"
platform: "linux"
package: "radcli"
version: "2.0.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rc_read_config"
---

# rc\_read\_config(3)

Read the global config file.

## NAME

rc\_read\_config - 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_add_config/3.md), [*rc\_apply\_config*(3)](/rc_apply_config/3.md), [*rc\_check\_tls*(3)](/rc_check_tls/3.md), [*rc\_conf\_int*(3)](/rc_conf_int/3.md), [*rc\_conf\_srv*(3)](/rc_conf_srv/3.md), [*rc\_conf\_str*(3)](/rc_conf_str/3.md), [*rc\_config\_free*(3)](/rc_config_free/3.md), [*rc\_config\_init*(3)](/rc_config_init/3.md), [*rc\_destroy*(3)](/rc_destroy/3.md), [*rc\_dict\_free*(3)](/rc_dict_free/3.md), [*rc\_find\_server\_addr*(3)](/rc_find_server_addr/3.md), [*rc\_get\_socket\_type*(3)](/rc_get_socket_type/3.md), [*rc\_get\_srcaddr*(3)](/rc_get_srcaddr/3.md), [*rc\_getport*(3)](/rc_getport/3.md), [*rc\_mksid*(3)](/rc_mksid/3.md), [*rc\_new*(3)](/rc_new/3.md), [*rc\_openlog*(3)](/rc_openlog/3.md), [*rc\_own\_hostname*(3)](/rc_own_hostname/3.md), [*rc\_read\_dictionary*(3)](/rc_read_dictionary/3.md), [*rc\_read\_dictionary\_from\_buffer*(3)](/rc_read_dictionary_from_buffer/3.md), [*rc\_setdebug*(3)](/rc_setdebug/3.md), [*rc\_test\_config*(3)](/rc_test_config/3.md), [*rc\_tls\_fd*(3)](/rc_tls_fd/3.md)
