radcli_ctx_set_secret(3)
π radcli_ctx_set_secret β the manual, but make it make sense
okay so bestie, welcome to radcli_ctx_set_secret(3) from the radcli Radius client library β¨ this one's short and sweet and honestly kind of iconic once you get what it's doing.
πΈ NAME πΈ
radcli_ctx_set_secret β sets the RADIUS shared secret for the authserver and/or acctserver you've already configured π
π¦ SYNOPSIS π¦
#include <radcli/>
int radcli_ctx_set_secret(
radcli_ctx *ctx,
unsigned target_mask,
const char *secret
);
π DESCRIPTION π
so like. real talk. this is the new-API equivalent of doing that little trick where you shove a secret inside the host:port:secret form of #RADCLI_OPT_AUTHSERVER/#RADCLI_OPT_ACCTSERVER's value β except it's its own whole distinct call instead of a delimited string, and it can set both server types' secret at once when they share one (which, ngl, is the usual case) via RADCLI_SECRET_AUTH | RADCLI_SECRET_ACCT. and the best part? you don't have to embed anything in the authserver/acctserver value at all. clean. immaculate. periodt π
β¨ PARAMETERS β¨
ctxβ a context whose#RADCLI_OPT_AUTHSERVERand/or#RADCLI_OPT_ACCTSERVER(whichever ones yourtarget_maskpoints at) is already set viaradcli_ctx_set_opt_str()orradcli_ctx_read_config()before you make this call π«Ά like, do that part first, okay?target_maskβ a bitwise OR of one or bothradcli_secret_targetvalues. pick your fighter(s) πsecretβ the shared secret itself, as a NUL-terminated string π
π RETURN VALUE π
0 on success, -1 on failure π and the failure cases are:
NULLctx/secrettarget_maskempty or carrying an unrecognised bit- or the corresponding server not yet configured
π₯ SEE ALSO π₯
radcli_ctx_apply(3)radcli_ctx_free(3)radcli_ctx_get_opt_int(3)radcli_ctx_get_opt_str(3)radcli_ctx_new(3)radcli_ctx_read_config(3)radcli_ctx_read_dictionary(3)radcli_ctx_read_dictionary_from_buffer(3)radcli_ctx_set_opt_int(3)radcli_ctx_set_opt_str(3)radcli_ctx_set_tls_psk(3)
and that's the whole thing, no cap π this page is brought to you by radcli, dated 2026-10-10 β go set some secrets bestie, you've got this π§β¨
π¦ where this page comes from
- arch rolling: radcli 2.0.1-1 Β· BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms