Initial release, version 0.0.0.
[gsasl.git] / src / callbacks.h
blobc680e1baf6d37e73ba53800402a64ceafa2e6f25
1 /* callbacks.h function prototypes for gsasl callbacks
2 * Copyright (C) 2002 Simon Josefsson
4 * This file is part of libgsasl.
6 * Libgsasl is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Libgsasl is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with libgsasl; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _CALLBACKS_H
23 #define _CALLBACKS_H
25 #include <gsasl.h>
27 extern int
28 client_callback_anonymous (Gsasl_session_ctx *ctx,
29 char *out,
30 size_t *outlen);
32 extern int
33 client_callback_authorization_id (Gsasl_session_ctx *ctx,
34 char *out,
35 size_t *outlen);
37 extern int
38 client_callback_authentication_id (Gsasl_session_ctx *ctx,
39 char *out,
40 size_t *outlen);
42 extern int
43 client_callback_password (Gsasl_session_ctx *ctx,
44 char *out,
45 size_t *outlen);
47 extern int
48 client_callback_service (Gsasl_session_ctx *ctx,
49 char *srv,
50 size_t *srvlen,
51 char *host,
52 size_t *hostlen,
53 char *srvname,
54 size_t *srvnamelen);
56 extern int
57 client_callback_passcode (Gsasl_session_ctx *ctx,
58 char *out,
59 size_t *outlen);
61 extern Gsasl_qop
62 client_callback_qop (Gsasl_session_ctx *ctx,
63 Gsasl_qop serverqops);
65 extern int
66 client_callback_maxbuf (Gsasl_session_ctx *ctx,
67 int servermaxbuf);
68 /* Server callbacks */
70 extern int
71 server_callback_cram_md5 (Gsasl_session_ctx *ctx,
72 char *username,
73 char *challenge,
74 char *response);
76 extern int
77 server_callback_anonymous (Gsasl_session_ctx *ctx,
78 const char *message);
80 extern Gsasl_qop
81 server_callback_qop (Gsasl_session_ctx *ctx);
83 extern int
84 server_callback_maxbuf (Gsasl_session_ctx *ctx);
86 extern int
87 server_callback_realm (Gsasl_session_ctx *ctx,
88 char *out,
89 size_t *outlen,
90 size_t nth);
92 extern int
93 server_callback_external (Gsasl_session_ctx *ctx);
95 extern int
96 server_callback_validate (Gsasl_session_ctx *ctx,
97 char *authorization_id,
98 char *authentication_id,
99 char *password);
101 extern int
102 server_callback_retrieve (Gsasl_session_ctx *ctx,
103 char *authentication_id,
104 char *authorization_id,
105 char *realm,
106 char *key,
107 size_t *keylen);
109 extern int
110 server_callback_service (Gsasl_session_ctx *ctx,
111 char *srv,
112 size_t *srvlen,
113 char *host,
114 size_t *hostlen);
117 server_callback_gssapi (Gsasl_session_ctx *ctx,
118 char *clientname,
119 char *authentication_id);
121 #endif /* _CALLBACKS_H */