1SASL_SERVER_NEW(3)                Cyrus SASL                SASL_SERVER_NEW(3)
2
3
4

NAME

6       sasl_server_new - Cyrus SASL documentation
7

SYNOPSIS

9       #include <sasl/sasl.h>
10
11       int sasl_server_new(const char *service,
12                       const char *serverFQDN,
13                       const char *user_realm,
14                       const char *iplocalport,
15                       const char *ipremoteport,
16                       const sasl_callback_t *callbacks,
17                       unsigned flags,
18                       sasl_conn_t ** pconn);
19

DESCRIPTION

21       int sasl_server_new(const char *service,
22
23       const char *serverFQDN,
24
25       const char *user_realm,
26
27       const char *iplocalport,
28
29       const char *ipremoteport,
30
31       const sasl_callback_t *callbacks,
32
33       unsigned flags,
34
35       sasl_conn_t ** pconn);
36              sasl_server_new()  creates a new SASL context. This context will
37              be used  for  all SASL calls for one connection. It handles both
38              authentication  and integrity/encryption  layers after authenti‐
39              cation.
40
41              Parameters
42
43                     · service – is the registered name of the  service  (usu‐
44                       ally the protocol name) using SASL (e.g. “imap”).
45
46                     · serverFQDN  –  is the  fully  qualified  server  domain
47                       name.  NULL  means  use gethostname().  This is  useful
48                       for multi-homed servers.
49
50                     · user_realm  – is the domain of the user agent. This  is
51                       usually not necessary (NULL is default)
52
53                     · iplocalport 
54
55                       is  the  IP and port of the local side of  the  connec‐
56                       tion, or NULL.  If iplocalport is NULL it will  disable
57                       mechanisms that require IP address  information.   This
58                       strings  must  be  in  one of the following formats:
59
60                       · ”a.b.c.d;port”  (IPv4),
61
62                       · ”e:f:g:h:i:j:k:l;port” (IPv6), or
63
64                       · ”e:f:g:h:i:j:a.b.c.d;port” (IPv6)
65
66
67                     · ipremoteport – is the IP and port of the remote side of
68                       the connection, or NULL (see iplocalport)
69
70                     · flags – are connection flags (see below)
71
72                     · pconn – is a pointer to the  connection  context  allo‐
73                       cated  by the library. This structure will be used  for
74                       all  future SASL calls for this connection.
75
76   Connection flags
77       Flags that may be passed to sasl_server_new():
78
79       · SASL_SUCCESS_DATA: The protocol supports a server‐last send
80
81       ·
82
83         SASL_NEED_PROXY: Force the use of a mechanism that supports an
84                authorization  id  that  is not the authentication id.
85

RETURN VALUE

87       SASL  callback  functions should return SASL return codes.  See  sasl.h
88       for a complete list. SASL_OK indicates success.
89
90       Other  return codes indicate errors and should either be handled or the
91       authentication session should be quit.
92

SEE ALSO

94       RFC 4422,:saslman:sasl(3),  sasl_server_init(3),  sasl_server_start(3),
95       sasl_server_step(3), sasl_setprop(3), sasl_errors(3)
96

AUTHOR

98       The Cyrus Team
99
101       1993-2016, The Cyrus Team
102
103
104
105
1062.1.27                         January 29, 2018             SASL_SERVER_NEW(3)
Impressum