An AC_LIBOBJ, from gnulib.
[gsasl.git] / lib / common.c
blobb3bd1f3c314e9611d11b3d2d94c91456f4ae76cf
1 /* common.c static variables
2 * Copyright (C) 2002 Simon Josefsson
4 * This file is part of libgsasl.
6 * Libgsasl is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with libgsasl; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "internal.h"
24 #include "cram-md5.h" /* RFC 2195 */
25 #include "external.h" /* RFC 2222 */
26 #include "x-gssapi.h" /* RFC 2222 */
27 #include "anonymous.h" /* RFC 2245 */
28 #include "plain.h" /* RFC 2595 */
29 #include "securid.h" /* RFC 2808 */
30 #include "digest-md5.h" /* RFC 2831 */
32 #include "login.h" /* non-standard */
33 #include "x-ntlm.h" /* non-standard */
35 const char *GSASL_VALID_MECHANISM_CHARACTERS =
36 "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789-_";
38 _Gsasl_mechanism _gsasl_all_mechanisms[] = {
39 #ifdef USE_ANONYMOUS
40 {_GSASL_ANONYMOUS_NAME,
41 {_gsasl_anonymous_client_init,
42 _gsasl_anonymous_client_done,
43 _gsasl_anonymous_client_start,
44 _gsasl_anonymous_client_step,
45 _gsasl_anonymous_client_finish,},
46 {_gsasl_anonymous_server_init,
47 _gsasl_anonymous_server_done,
48 _gsasl_anonymous_server_start,
49 _gsasl_anonymous_server_step,
50 _gsasl_anonymous_server_finish}
52 #endif /* USE_ANONYMOUS */
54 #ifdef USE_EXTERNAL
55 {_GSASL_EXTERNAL_NAME,
56 {_gsasl_external_client_init,
57 _gsasl_external_client_done,
58 _gsasl_external_client_start,
59 _gsasl_external_client_step,
60 _gsasl_external_client_finish,},
61 {_gsasl_external_server_init,
62 _gsasl_external_server_done,
63 _gsasl_external_server_start,
64 _gsasl_external_server_step,
65 _gsasl_external_server_finish}
67 #endif /* USE_EXTERNAL */
69 #ifdef USE_LOGIN
70 {_GSASL_LOGIN_NAME,
71 {_gsasl_login_client_init,
72 _gsasl_login_client_done,
73 _gsasl_login_client_start,
74 _gsasl_login_client_step,
75 _gsasl_login_client_finish,},
76 {_gsasl_login_server_init,
77 _gsasl_login_server_done,
78 _gsasl_login_server_start,
79 _gsasl_login_server_step,
80 _gsasl_login_server_finish}
82 #endif /* USE_LOGIN */
84 #ifdef USE_PLAIN
85 {_GSASL_PLAIN_NAME,
86 {_gsasl_plain_client_init,
87 _gsasl_plain_client_done,
88 _gsasl_plain_client_start,
89 _gsasl_plain_client_step,
90 _gsasl_plain_client_finish,},
91 {_gsasl_plain_server_init,
92 _gsasl_plain_server_done,
93 _gsasl_plain_server_start,
94 _gsasl_plain_server_step,
95 _gsasl_plain_server_finish}
97 #endif /* USE_PLAIN */
99 #ifdef USE_SECURID
100 {_GSASL_SECURID_NAME,
101 {_gsasl_securid_client_init,
102 _gsasl_securid_client_done,
103 _gsasl_securid_client_start,
104 _gsasl_securid_client_step,
105 _gsasl_securid_client_finish},
106 {_gsasl_securid_server_init,
107 _gsasl_securid_server_done,
108 _gsasl_securid_server_start,
109 _gsasl_securid_server_step,
110 _gsasl_securid_server_finish}
112 #endif /* USE_SECURID */
114 #ifdef USE_NTLM
115 {_GSASL_NTLM_NAME,
116 {_gsasl_ntlm_client_init,
117 _gsasl_ntlm_client_done,
118 _gsasl_ntlm_client_start,
119 _gsasl_ntlm_client_step,
120 _gsasl_ntlm_client_finish},
122 #endif /* USE_NTLM */
124 #ifdef USE_CRAM_MD5
125 {_GSASL_CRAM_MD5_NAME,
126 {_gsasl_cram_md5_client_init,
127 _gsasl_cram_md5_client_done,
128 _gsasl_cram_md5_client_start,
129 _gsasl_cram_md5_client_step,
130 _gsasl_cram_md5_client_finish},
131 {_gsasl_cram_md5_server_init,
132 _gsasl_cram_md5_server_done,
133 _gsasl_cram_md5_server_start,
134 _gsasl_cram_md5_server_step,
135 _gsasl_cram_md5_server_finish}
137 #endif /* USE_CRAM_MD5 */
139 #ifdef USE_DIGEST_MD5
140 {_GSASL_DIGEST_MD5_NAME,
141 {_gsasl_digest_md5_client_init,
142 _gsasl_digest_md5_client_done,
143 _gsasl_digest_md5_client_start,
144 _gsasl_digest_md5_client_step,
145 _gsasl_digest_md5_client_finish,
146 _gsasl_digest_md5_client_encode,
147 _gsasl_digest_md5_client_decode},
148 {_gsasl_digest_md5_server_init,
149 _gsasl_digest_md5_server_done,
150 _gsasl_digest_md5_server_start,
151 _gsasl_digest_md5_server_step,
152 _gsasl_digest_md5_server_finish,
153 _gsasl_digest_md5_server_encode,
154 _gsasl_digest_md5_server_decode},
156 #endif /* USE_DIGEST_MD5 */
158 #if USE_GSSAPI
159 {_GSASL_GSSAPI_NAME,
160 {_gsasl_gssapi_client_init,
161 _gsasl_gssapi_client_done,
162 _gsasl_gssapi_client_start,
163 _gsasl_gssapi_client_step,
164 _gsasl_gssapi_client_finish},
165 {_gsasl_gssapi_server_init,
166 _gsasl_gssapi_server_done,
167 _gsasl_gssapi_server_start,
168 _gsasl_gssapi_server_step,
169 _gsasl_gssapi_server_finish}
171 #endif /* USE_GSSAPI */