SASL_SERVER_STEP(3)

πŸ’… SASL_SERVER_STEP(3) πŸ’…

okay bestie, gather round, because we're talking about sasl_server_step from the Cyrus SASL manual, section 3, and honestly? it's giving backstage pass to the auth handshake. 🎟️✨


🌸 NAME 🌸

sasl_server_step β€” Cyrus SASL documentation, fr fr. that's the whole name, no notes. 🫢


✨ SYNOPSIS ✨

#include <sasl/sasl.h>

int sasl_server_step(sasl_conn_t *conn,
    const char *clientin,
    unsigned clientinlen,
    const char ** serverout,
    unsigned * serveroutlen);

πŸ¦‹ DESCRIPTION πŸ¦‹

int sasl_server_step(sasl_conn_t *conn,

const char *clientin,

unsigned clientinlen,

const char **serverout,

unsigned * serveroutlen);

so like, sasl_server_step() performs a step in the authentication negotiation. it's literally one move in the dance. πŸ’ƒ

it returns SASL_OK if the whole negotiation is successful, and SASL_CONTINUE if this step is ok but at least one more step is needed. no cap β€” those are the two happy outcomes.

πŸŽ€ Parameters πŸŽ€

  • conn β€” is the SASL connection context. the whole vibe, the main character of the operation. πŸ‘‘
  • clientin β€” is the data given by the client (decoded if the protocol encodes requests sent over the wire). so if your protocol wraps stuff up, you hand it over already unwrapped, got it? πŸ™ˆ
  • clientinlen β€” is the length of clientin. tell her how long the thing is. πŸ“
  • serverout β€” set by the library and should be sent to the client. the library writes it, you ship it out. 🚚
  • serveroutlen β€” length of serverout. again, the length. the library fills it in for you. 🌈

πŸ”₯ 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.
  • SASL_OK indicates that the authentication is complete. πŸŽ‰

other return codes indicate errors and should either be handled or the authentication session should be quit. like, for real, don't just sit there ignoring them β€” either deal with it or bail on the session. 😭

not me stressing about error codes... anyway, handle them or quit the session. those are the options bestie. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

RFC 4422,:saslman:sasl(3), sasl_server_init(3), sasl_server_new(3), sasl_server_start(3), sasl_errors(3)

iykyk, go read those next. πŸ“šβœ¨


🧚 AUTHOR 🧚

The Cyrus Team


1993-2016, The Cyrus Team


and that's the whole page bestie β€” SASL_SERVER_STEP(3), straight out of Cyrus SASL version 2.1.28, dated February 18, 2022. periodt. πŸ’…πŸŽ€πŸ¦‹