GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / man / sasl_server_new.3
1 .\" -*- nroff -*-
2 .\" 
3 .\" Copyright (c) 2001 Carnegie Mellon University.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer. 
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in
14 .\"    the documentation and/or other materials provided with the
15 .\"    distribution.
16 .\"
17 .\" 3. The name "Carnegie Mellon University" must not be used to
18 .\"    endorse or promote products derived from this software without
19 .\"    prior written permission. For permission or any other legal
20 .\"    details, please contact  
21 .\"      Office of Technology Transfer
22 .\"      Carnegie Mellon University
23 .\"      5000 Forbes Avenue
24 .\"      Pittsburgh, PA  15213-3890
25 .\"      (412) 268-4387, fax: (412) 268-7395
26 .\"      tech-transfer@andrew.cmu.edu
27 .\"
28 .\" 4. Redistributions of any form whatsoever must retain the following
29 .\"    acknowledgment:
30 .\"    "This product includes software developed by Computing Services
31 .\"     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
32 .\"
33 .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
34 .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35 .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
36 .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
38 .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
39 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40 .\" 
41 .TH sasl_server_new "16 May 2001" SASL "SASL man pages"
42 .SH NAME
43 sasl_server_new \- Create a new server authentication object
44
45
46 .SH SYNOPSIS
47 .nf
48 .B #include <sasl/sasl.h>
49 .sp
50 .BI "int sasl_server_new(const char " *service ", "
51 .BI "                    const char " *serverFQDN ", "
52 .BI "                    const char " *user_realm ", "
53 .BI "                    const char " *iplocalport ", "
54 .BI "                    const char " *ipremoteport ", "
55 .BI "                    const sasl_callback_t " *callbacks ", "
56 .BI "                    unsigned " flags ", "
57 .BI "                    sasl_conn_t ** " pconn ");"
58
59 .fi
60 .SH DESCRIPTION
61
62 .B sasl_server_new()
63 creates a new SASL context. This context will be used for all SASL
64 calls for one connection. It handles both authentication and
65 integrity/encryption layers after authentication.
66 .PP
67 .I service
68 is the registered name of the service (usually the protocol name) using SASL (e.g. "imap").
69 .PP
70 .I serverFQDN
71 is the fully qualified server domain name.  NULL means use gethostname().  This is useful for multi-homed servers.
72 .PP
73 .I user_realm
74 is the domain of the user agent. This is usually not necessary (NULL is default)
75 .PP
76 .I iplocalport
77 is the IP and port of the local side of the connection, or NULL.  If
78 iplocalport is NULL it will disable mechanisms that require IP address
79 information.  This strings must be in one of the following formats:
80 "a.b.c.d;port" (IPv4), "e:f:g:h:i:j:k:l;port" (IPv6),
81 or "e:f:g:h:i:j:a.b.c.d;port" (IPv6)
82 .PP
83 .I ipremoteport
84 is the IP and port of the remote side of the connection, or NULL (see
85 iplocalport)
86 .PP
87 .I flags
88 are connection flags (see below)
89 .PP
90 .I pconn
91 is a pointer to the connection context allocated by the library. This
92 structure will be used for all future SASL calls for this connection.
93 .PP
94
95 .B Connection Flags
96 .TP 0.8i
97 .B SASL_SUCCESS_DATA
98 The protocol supports a server-last send
99 .TP 0.8i
100 .B SASL_NEED_PROXY
101 Force the use of a mechanism that supports an authorization id that is
102 not the authentication id.
103
104 .SH "RETURN VALUE"
105
106 .B sasl_server_new()
107 returns an integer which corresponds to one of the
108 SASL error codes. SASL_OK is the only one that indicates success. All
109 others indicate errors and should either be handled or the
110 authentication session should be quit.
111
112 .SH "CONFORMING TO"
113 RFC 2222
114 .SH "SEE ALSO"
115 sasl(3), sasl_errors(3), sasl_server_init(3), sasl_server_start(3), sasl_server_step(3), sasl_setprop(3)