1SASL_CLIENT_NEW(3) Cyrus SASL SASL_CLIENT_NEW(3)
2
3
4
6 sasl_client_new - Cyrus SASL documentation
7
9 #include <sasl/sasl.h>
10
11 int sasl_client_new(const char *service,
12 const char *serverFQDN,
13 const char *iplocalport,
14 const char *ipremoteport,
15 const sasl_callback_t *prompt_supp,
16 unsigned flags,
17 sasl_conn_t ** pconn);
18
20 int sasl_client_new(const char *service,
21
22 const char *serverFQDN,
23
24 const char *iplocalport,
25
26 const char *ipremoteport,
27
28 const sasl_callback_t *prompt_supp,
29
30 unsigned flags,
31
32 sasl_conn_t ** pconn);
33 sasl_client_new() creates a new SASL context. This context will
34 be used for all SASL calls for one connection. It handles both
35 authentication and integrity/encryption layers after authentica‐
36 tion.
37
38 Parameters
39
40 · service – the registered name of the service (usually
41 the protocol name) using SASL (e.g. “imap”).
42
43 · serverFQDN – the fully qualified domain name of the
44 server (e.g. “serverhost.example.com”).
45
46 · iplocalport – the IP and port of the local side of the
47 connection, or NULL. If iplocalport is NULL it will
48 disable mechanisms that require IP address information.
49 This string must be in one of the following for‐
50 mats: “a.b.c.d;port” (IPv4), “e:f:g:h:i:j:k:l;port”
51 (IPv6), or “e:f:g:h:i:j:a.b.c.d;port” (IPv6)
52
53 · ipremoteport – the IP and port of the remote side of
54 the connection, or NULL (see iplocalport)
55
56 · prompt_supp – a list of client interactions supported
57 that is unique to this connection. If this parameter is
58 NULL the global callbacks (specified in
59 sasl_client_init(3)) will be used. See sasl_call‐
60 backs(3) for more information.
61
62 · flags – are connection flags (see below)
63
64 · pconn – the connection context allocated by the
65 library. This structure will be used for all future
66 SASL calls for this connection.
67
68 Connection Flags
69 Flags that may be passed to sasl_client_new():
70
71 · SASL_SUCCESS_DATA: The protocol supports a server‐last send
72
73 ·
74
75 SASL_NEED_PROXY: Force the use of a mechanism that supports an
76 authorization id that is not the authentication id.
77
79 SASL callback functions should return SASL return codes. See sasl.h
80 for a complete list. SASL_OK indicates success.
81
82 The following return codes indicate errors and should either be handled
83 or the authentication session should be quit:
84
85 · SASL_NOMECH: No mechanism meets requested properties
86
87 · SASL_BADPARAM: Error in config file
88
89 · SASL_NOMEM: Not enough memory to complete operation
90
92 RFC 4422,:saslman:sasl(3), sasl_callbacks(3), sasl_client_init(3),
93 sasl_client_start(3), sasl_client_step(3), sasl_setprop(3)
94
96 The Cyrus Team
97
99 1993-2016, The Cyrus Team
100
101
102
103
1042.1.27 November 08, 2018 SASL_CLIENT_NEW(3)