gsasl_step(3)
๐ gsasl_step โ the tiny function that does ONE step of the whole SASL thing
okay bestie, gather round, because this is a gsasl manpage (from the gsasl manual set, fr) and we're about to make it make sense ๐ธ
โจ NAME โจ
gsasl_step โ it's an API function, periodt. that's the whole name, no notes ๐
๐ฆ SYNOPSIS ๐ฆ
lowkey the vibe is: you include the header, you call the function, you get an int back:
#include <gsasl.h>
int gsasl_step(Gsasl_session * sctx, const char * input, size_t
input_len, char ** output, size_t * output_len);
that's it. that's the whole summoning circle ๐
๐ธ ARGUMENTS ๐ธ
here's who's who at the function party ๐
Gsasl_session * sctxโ your libgsasl session handle. the main character of this whole operation ๐const char * inputโ the input byte array. bytes coming in, bestie ๐ฅsize_t input_lenโ size of that input byte array. like, how many bytes we talking ๐งฎchar ** outputโ a newly allocated output byte array. fresh out the allocator, no cap โจsize_t * output_lenโ pointer to the output variable that holds the size of the output byte array. so you know exactly how big your gift is ๐
๐ DESCRIPTION ๐
so what does it DO. it performs one step of SASL authentication. one. step. like a lil dance move in a much longer routine ๐บ
here's the pipeline, and I need you to follow me on this:
- it reads data from the other end (from
inputandinput_len) ๐ - it processes that data โ and yes, this can potentially invoke callbacks to the application, so heads up, your app might get paged ๐
- it writes data to the server, into the newly allocated variable
output, plusoutput_lenwhich tells you the length ofoutput๐ค
okay this next part is IMPORTANT so listen up ๐ฅ
the contents of the output buffer are unspecified if this function returns anything other than GSASL_OK or GSASL_NEEDS_MORE. unspecified. do not touch. do not read. do not trust it. it's giving mystery box but the bad kind ๐
but โ if the function DOES return GSASL_OK or GSASL_NEEDS_MORE, then the output buffer is allocated by this function, and bestie, it is your responsibility to deallocate it by calling gsasl_free(output). it's yours now. take care of it. don't leak it, I'm begging ๐
Return value: returns GSASL_OK if authentication terminated successfully, GSASL_NEEDS_MORE if more data is needed, or an error code. three moods, pick one ๐
๐ REPORTING BUGS ๐
found a bug? (first of all, relatable.) report bugs to <bug-gsasl@gnu.org> ๐ง
general guidelines for reporting bugs live here: https://www.gnu.org/gethelp/
and the GNU SASL home page is: https://www.gnu.org/software/gsasl/ ๐
๐ COPYRIGHT ๐
Copyright ยฉ 2002-2026 Simon Josefsson.
copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, go wild, but keep the receipts ๐งพ๐
๐ SEE ALSO ๐
the full documentation for gsasl is maintained as a Texinfo manual. if the info and gsasl programs are properly installed at your site, the command
info gsasl
should give you access to the complete manual. iykyk ๐โจ
as an alternative you may obtain the manual from:
https://www.gnu.org/software/libidn/gsasl/manual/
and that's the whole page, bestie ๐ซถ this was gsasl version 2.2.4, dated with the gsasl_step(3) energy we all know and love โ mwah, slay, go authenticate responsibly ๐
โญ
๐ฆ where this page comes from
- arch rolling: gsasl 2.2.4-1 ยท LGPL-2.1-or-later AND GPL-3.0-or-later AND GFDL-1.3-or-later
- ubuntu stonking: libgsasl-dev 2.2.4-1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms