GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / man / sasl_server_start.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_start "10 July 2001" SASL "SASL man pages"
42 .SH NAME
43 sasl_server_start \- Begin an authentication negotiation
44
45
46 .SH SYNOPSIS
47 .nf
48 .B #include <sasl/sasl.h>
49 .sp
50 .BI "int sasl_server_start(sasl_conn_t * " conn ", "
51 .BI "                      const char * " mech ", "
52 .BI "                      const char * " clientin ", "
53 .BI "                      unsigned * " clientinlen ", "
54 .BI "                      const char ** " serverout ", "
55 .BI "                      unsigned * " serveroutlen ");"
56 .fi
57 .SH DESCRIPTION
58
59 .B sasl_server_start()
60 begins the authentication with the mechanism specified with mech. This
61 fails if the mechanism is not supported. SASL_OK is returned if the
62 authentication is complete and the user is
63 authenticated. SASL_CONTINUE is returned if one or more steps are
64 still required in the authentication. All other return values indicate
65 failure.
66
67 .PP
68 .I conn
69 is the SASL context for this connection
70 .PP
71 .I mech
72 is the mechanism name that the client requested
73 .PP
74 .I clientin
75 is the client initial response, NULL if the protocol lacks support for
76 client-send-first or if the other end did not have an initial send.  Note that
77 no initial client send is distinct from an initial send of a null string,
78 and the protocol MUST account for this difference.
79
80 .PP
81 .I clientinlen
82 is the length of initial response
83 .PP
84 .I serverout
85 is created by the plugin library. It is the initial server response to send to the client. This is allocated/freed by the library and it is the job of the client to send it over the network to the server. Also protocol specific encoding (such as base64 encoding) must needs to be done by the server.
86 .PP
87 .I serveroutlen
88 is set to the length of initial server challenge
89 .PP
90
91 .PP
92
93 .SH "RETURN VALUE"
94
95 sasl_server_start returns an integer which corresponds to one of the
96 SASL errorcodes. SASL_OK indicates that authentication is completed
97 successfully. SASL_CONTINUE indicates success and that there are
98 more steps needed in the authentication. All other return codes
99 indicate errors and should either be handled or the authentication
100 session should be quit.
101
102 .SH "CONFORMING TO"
103 RFC 2222
104 .SH "SEE ALSO"
105 sasl(3), sasl_errors(3), sasl_server_init(3), sasl_server_new(3), sasl_server_step(3)