SASL_GETSECRET_T(3)
π NAME π
sasl_getsecret_t β Cyrus SASL documentation, bestie. That's the whole vibe. It's giving "the callback that hands over your secret."
β¨ SYNOPSIS β¨
#include <sasl/sasl.h>
int sasl_getsecret_t(sasl_conn_t *conn,
void *context,
int id,
sasl_secret_t ** psecret);
π DESCRIPTION π
okay so here's the whole function again, laid out all dramatic:
int sasl_getsecret_t(sasl_conn_t *conn,
void *context,
int id,
sasl_secret_t ** psecret);
sasl_getsecret_t() is literally the function you use to retrieve the secret from the application. Like, the app is holding the secret, and this is the little hand-off moment. π«Ά
And here's the part you cannot skip: a sasl_secret_t should be allocated to length sizeof(sasl_secret_t) + <length of secret>. Yes, you read that right β you size it for the struct plus the actual secret, not just the struct. Slay but make it correct. π
It's got two fields, and you need both:
lenβ which is the length of the secret in bytes.dataβ which contains the secret itself (and ngl, it does not need to be null terminated).
πΈ Parameters
connβ is the SASL connection context
fr fr, that's the parameter list. Just conn. Don't come for me, I'm only the messenger. π
π₯ RETURN VALUE π₯
SASL callback functions should return SASL return codes. See sasl.h for a complete list β it's all in there, go look, iykyk. β¨
SASL_OK indicates success. iconic. perfect. no notes. π
Other return codes indicate errors and should be handled. Not optional, bestie. Handle them. π
π¦ SEE ALSO π¦
RFC 4422, :saslman:sasl(3), sasl_callbacks(3)
π AUTHOR π
The Cyrus Team
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the whole page, periodt. πβ¨ This one's from Cyrus SASL 2.1.28, dated February 18, 2022 β she's an older icon but she still ate. ππ¦ go forth and allocate your secrets correctly, mwah π
π¦ where this page comes from
- alpine 3.22: cyrus-sasl-doc 2.1.28-r8 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.23: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.24: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- centos-stream 10: cyrus-sasl-devel 2.1.28-27.el10 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms