SASL_CLIENT_START(3)
β¨ SASL_CLIENT_START(3) β¨
okay bestie, gather round, because we're cracking open sasl_client_start from the Cyrus SASL manual, section 3 (library functions, iykyk). this is the one that kicks off the whole authentication glow-up. let's get into it π
πΈ NAME πΈ
sasl_client_start β Cyrus SASL documentation
(that's it, that's the name, short and iconic π
π¦ SYNOPSIS π¦
#include <sasl/sasl.h>
int sasl_client_start(sasl_conn_t * conn,
const char * mechlist,
sasl_interact_t ** prompt_need,
const char ** clientout,
unsigned * clientoutlen,
const char ** mech);
π DESCRIPTION π
so, same signature again but with β¨spacingβ¨ because the original manpage said so, and we respect the original:
int sasl_client_start(sasl_conn_t * conn,
const char * mechlist,
sasl_interact_t ** prompt_need,
const char ** clientout,
unsigned * clientoutlen,
const char ** mech);
sasl_client_start() does two big things: it picks a mechanism for authentication, and it starts the authentication session. main character energy fr fr.
the mechlist is the list of mechanisms the client might like to use. and listen β the mechanisms in that list are not necessarily supported by the client, and they're not even necessarily valid. so don't come for her if some of them are fake. SASL decides which of these to actually use based on the security preferences you specified earlier. typically, mechlist is a list of mechanisms the server supports, acquired from a capability request. π
if SASL_INTERACT comes back at you, that means the library needs some values filled in before it can keep going. the prompt_need structure gets filled in with the requests. your app should fulfill those requests and then call sasl_client_start again with identical parameters β and heads up, the prompt_need parameter will be the same pointer as before, just now filled in by the application. no cap.
π Parameters π
connβ is the SASL connection context. your lil connection bby.mechlistβ is a list of mechanisms the server has available. Punctuation is ignored. so like, commas and stuff? she doesn't care, she's above it.prompt_needβ is filled in with a list of prompts needed to continue (if necessary).clientoutβ is created. it's the initial client response to send to the server. it is the job of the client to send it over the network to the server. any protocol specific encoding (such as base64 encoding) that's necessary needs to be done by the client. π- if the protocol lacks client-send-first capability, then set
clientouttoNULL. - if there is no initial client-send, then
*clientoutwill be set toNULLon return.
- if the protocol lacks client-send-first capability, then set
clientoutlenβ length ofclientout.mechβ contains the name of the chosen SASL mechanism (on success).
π₯ RETURN VALUE π₯
SASL callback functions should return SASL return codes. see sasl.h for a complete list. SASL_CONTINUE indicates success and that there are more steps needed in the authentication. (she's not done yet, she's just getting started β¨)
other return codes indicate errors and should either be handled, or the authentication session should be quit. like, genuinely, no shade, just close the door and walk away πͺπ
π SEE ALSO π
RFC 4422, :saslman:sasl(3), sasl_callbacks(3), sasl_client_init(3), sasl_client_new(3), sasl_client_step(3), sasl_errors(3)
(the whole friend group π«Ά go read them all, they're all serving)
π§ AUTHOR π§
The Cyrus Team
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the tea, bestie β this page is straight outta Cyrus SASL version 2.1.28, dated February 18, 2022 β so if you're reading this in the group chat, that's the version and date it was born. periodt. πβ¨
π¦ 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