SASL_CLIENT_NEW(3)
β¨ SASL_CLIENT_NEW β¨
okay bestie, gather round, because this is the Cyrus SASL manual page for sasl_client_new and she is iconic π
πΈ NAME πΈ
sasl_client_new β Cyrus SASL documentation
π¦ SYNOPSIS π¦
#include <sasl/sasl.h>
int sasl_client_new(const char *service,
const char *serverFQDN,
const char *iplocalport,
const char *ipremoteport,
const sasl_callback_t *prompt_supp,
unsigned flags,
sasl_conn_t ** pconn);
π DESCRIPTION π
so like, here's the whole signature again, laid out all dramatic for you:
int sasl_client_new(const char *service,
const char *serverFQDN,
const char *iplocalport,
const char *ipremoteport,
const sasl_callback_t *prompt_supp,
unsigned flags,
sasl_conn_t ** pconn);
sasl_client_new() creates a new SASL context. one context per connection, that's the rule. This context gets used for all the SASL calls for one connection, no cap. And it handles both the authentication part and the integrity/encryption layers after authentication. she does it all π
π Parameters π
serviceβ the registered name of the service (usually the protocol name) using SASL (e.g."imap"). yes bestie, like that.serverFQDNβ the fully qualified domain name of the server (e.g."serverhost.example.com"). full government name energy β¨iplocalportβ the IP and port of the local side of the connection, orNULL. IfiplocalportisNULLit will disable mechanisms that require IP address information. This string must be in one of the following formats:"a.b.c.d;port"(IPv4),"e:f:g:h:i:j:k:l;port"(IPv6), or"e:f:g:h:i:j:a.b.c.d;port"(IPv6). three formats, pick your fighteripremoteportβ the IP and port of the remote side of the connection, orNULL(seeiplocalport). same rules, other end of the wire π«Άprompt_suppβ a list of client interactions supported that is unique to this connection. If this parameter isNULLthe global callbacks (specified insasl_client_init(3)) will be used. Seesasl_callbacks(3)for more information. lowkey the "if you don't bring your own, we use the group chat's" option πflagsβ are connection flags (see below). we're getting to those, hold on πββοΈpconnβ the connection context allocated by the library. This structure will be used for all future SASL calls for this connection. she's the main character of this connection, periodt π
π Connection Flags π
Flags that may be passed to sasl_client_new():
SASL_SUCCESS_DATAβ The protocol supports a server-last send. yes ma'am, server gets the last word on this one πSASL_NEED_PROXYβ Force the use of a mechanism that supports an authorization id that is not the authentication id. forcing it fr fr, no negotiating.
β RETURN VALUE β
SASL callback functions should return SASL return codes. See sasl.h for a complete list. SASL_OK indicates success. we love a success story π
The following return codes indicate errors and should either be handled or the authentication session should be quit:
SASL_NOMECHβ No mechanism meets requested propertiesSASL_BADPARAMβ Error in config fileSASL_NOMEMβ Not enough memory to complete operation
ok so real talk bestie: those three? either handle them properly or quit the whole authentication session. no vibing through an error, that's not the move π
π§ SEE ALSO π§
RFC 4422,:saslman:sasl(3), sasl_callbacks(3), sasl_client_init(3), sasl_client_start(3), sasl_client_step(3), sasl_setprop(3)
go read those too, they're all in the same friend group πΈ
π AUTHOR π
The Cyrus Team
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the whole page, bestie!! version 2.1.28, dated February 18, 2022 β sending you love and successful SASL handshakes always π«Άβ¨π
π¦ 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