NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
SASL authentication

SASL can stack a protection layer on top of an existing connection.

To handle this, we store a saslconn_t in conn->sockdata, and write wrappers which en/decode the read/write stream, then replace sockdata with an embedded copy of the old sockdata and call the underlying functions (which we've also preserved). I thought about trying to make a general stackable connection system, but it seemed like overkill. Something is wrong if we have 15 filters on top of a socket. Anyway, anything else which wishes to stack can use the same method. The only disadvantage is we have to write wrappers for all the socket methods, even if we only stack over read and write. Thinking about it, the abstraction problem is that there is more in Connection than there needs to be. Ideally it would have only (void*)data and methods.

Data

Data Description Links
SaslAuthenticators Authenticaion methods supported by Cyrus SASL

Functions

Function Description Links
getnameinfo_err() Convert a getaddrinfo() error code into an SASL error code
iptostring() Convert IP Address to string
mutt_sasl_cb_authname() Callback to retrieve authname or user from ConnAccount
mutt_sasl_cb_log() Callback to log SASL messages
mutt_sasl_cb_pass() SASL callback function to get password
mutt_sasl_client_new() sasl_client_new()
mutt_sasl_conn_close() Close SASL connection Connection::close(), connection_close
mutt_sasl_conn_open() Empty wrapper for underlying open function Connection::open(), connection_open
mutt_sasl_conn_poll() Check an SASL connection for data Connection::poll(), connection_poll
mutt_sasl_conn_read() Read data from an SASL connection Connection::read(), connection_read
mutt_sasl_conn_write() Write to an SASL connection Connection::write(), connection_write
mutt_sasl_done() Invoke when processing is complete
mutt_sasl_get_callbacks() Get the SASL callback functions
mutt_sasl_interact() Perform an SASL interaction with the user
mutt_sasl_setup_conn() Set up an SASL connection
mutt_sasl_start() Initialise SASL library
sasl_auth_validator() Validate an auth method against Cyrus SASL methods