SASL_ENCODEV(3)
π SASL_ENCODEV(3) β the Cyrus SASL glow-up π
okay bestie, welcome to sasl_encodev(3) from the Cyrus SASL manual, section 3 ofc. this is the one that wraps your outgoing bytes in whatever security layer you and your remote bestie negotiated. no cap, it's iconic. let's get into it π«Ά
β¨ NAME β¨
sasl_encodev β literally the Cyrus SASL documentation for it, that's the name, that's the vibe π
πΈ SYNOPSIS πΈ
#include <sasl/sasl.h>
int sasl_encode(sasl_conn_t *conn,
const char * input,
unsigned inputlen,
const char ** output,
unsigned * outputlen);
int sasl_encodev(sasl_conn_t *conn,
const struct iovec * invec,
unsigned numiov,
const char ** output,
unsigned * outputlen);
two functions, one <sasl/sasl.h> include, and yes you have to actually type the include, it's not gonna include itself π
π¦ DESCRIPTION π¦
so sasl_encode encodes data to be sent to be sent to a remote host who we've had a successful authentication session with. (<- yes the manual says "to be sent" twice, we're keeping it, it's part of the lore π) if there is a negotiated security layer, then the data in is signed/encrypted and the output should be sent without modification to the remote host. and if there is no</> security layer? the output is identical to the input. literally identical. same bytes. no notes. β¨
sasl_encodev does the same exact thing, but for a struct iovec instead of a character buffer. that's the whole difference. iovec girlies rise up π§
π the sasl_encode situation π
int sasl_encode(sasl_conn_t *conn,
const char * input,
unsigned inputlen,
const char ** output,
unsigned * outputlen);
π Parameters
connβ is the SASL connection contextoutputβ contains the decoded data and is allocated/freed by the library.outputlenβ length ofoutput.
ok quick heads up bestie β that's the whole parameter list, exactly like the original has it. we're not adding anything, we're not taking anything away. π
π the sasl_encodev situation π
int sasl_encodev(sasl_conn_t *conn,
const struct iovec * invec,
unsigned numiov,
const char ** output,
unsigned * outputlen);
π Parameters
connβ is the SASL connection contextoutputβ contains the decoded data and is allocated/freed by the library.outputlenβ length ofoutput.
same energy, same three params, same "the library ownsoutput" energy. don't you darefree()it yourself π
π₯ RETURN VALUE π₯
SASL callback functions should return SASL return codes. See sasl.h for a complete list. SASL_OK indicates success. π
Other return codes indicate errors and should be handled. like, actually handled. not vibe-checked and ignored. fr fr. π
π SEE ALSO π
- RFC 4422
:saslman:sasl(3)sasl_decode(3)sasl_errors(3)
go read sasl_decode(3), it's the reverse girlie and she's also serving π
π AUTHOR π
The Cyrus Team. legends only, honestly.
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the whole page, bestie!! this was Cyrus SASL version 2.1.28, dated February 18, 2022, section 3, SASL_ENCODEV(3) β mwah, slay, go encrypt something responsibly πβ¨π¦
π¦ 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