df23776a63c35da9c82b7fe6450d0c2083a4cb4f
[ira/wip.git] / source4 / heimdal / lib / gssapi / krb5 / external.c
1 /*
2  * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
3  * (Royal Institute of Technology, Stockholm, Sweden).
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the Institute nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  */
33
34 #include "gsskrb5_locl.h"
35 #include <gssapi_mech.h>
36
37 /*
38  * The implementation must reserve static storage for a
39  * gss_OID_desc object containing the value
40  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
41  *              "\x01\x02\x01\x01"},
42  * corresponding to an object-identifier value of
43  * {iso(1) member-body(2) United States(840) mit(113554)
44  *  infosys(1) gssapi(2) generic(1) user_name(1)}.  The constant
45  * GSS_C_NT_USER_NAME should be initialized to point
46  * to that gss_OID_desc.
47  */
48
49 static gss_OID_desc gss_c_nt_user_name_oid_desc =
50     {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12" "\x01\x02\x01\x01")};
51
52 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_USER_NAME =
53     &gss_c_nt_user_name_oid_desc;
54
55 /*
56  * The implementation must reserve static storage for a
57  * gss_OID_desc object containing the value
58  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
59  *              "\x01\x02\x01\x02"},
60  * corresponding to an object-identifier value of
61  * {iso(1) member-body(2) United States(840) mit(113554)
62  *  infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
63  * The constant GSS_C_NT_MACHINE_UID_NAME should be
64  * initialized to point to that gss_OID_desc.
65  */
66
67 static gss_OID_desc gss_c_nt_machine_uid_name_oid_desc =
68     {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12" "\x01\x02\x01\x02")};
69
70 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_MACHINE_UID_NAME =
71     &gss_c_nt_machine_uid_name_oid_desc;
72
73 /*
74  * The implementation must reserve static storage for a
75  * gss_OID_desc object containing the value
76  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
77  *              "\x01\x02\x01\x03"},
78  * corresponding to an object-identifier value of
79  * {iso(1) member-body(2) United States(840) mit(113554)
80  *  infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
81  * The constant GSS_C_NT_STRING_UID_NAME should be
82  * initialized to point to that gss_OID_desc.
83  */
84
85 static gss_OID_desc gss_c_nt_string_uid_name_oid_desc =
86     {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12" "\x01\x02\x01\x03")};
87
88 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_STRING_UID_NAME =
89     &gss_c_nt_string_uid_name_oid_desc;
90
91 /*
92  * The implementation must reserve static storage for a
93  * gss_OID_desc object containing the value
94  * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
95  * corresponding to an object-identifier value of
96  * {iso(1) org(3) dod(6) internet(1) security(5)
97  * nametypes(6) gss-host-based-services(2)).  The constant
98  * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
99  * to that gss_OID_desc.  This is a deprecated OID value, and
100  * implementations wishing to support hostbased-service names
101  * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
102  * defined below, to identify such names;
103  * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
104  * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
105  * parameter, but should not be emitted by GSS-API
106  * implementations
107  */
108
109 static gss_OID_desc gss_c_nt_hostbased_service_x_oid_desc =
110     {6, rk_UNCONST("\x2b\x06\x01\x05\x06\x02")};
111
112 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_HOSTBASED_SERVICE_X =
113     &gss_c_nt_hostbased_service_x_oid_desc;
114
115 /*
116  * The implementation must reserve static storage for a
117  * gss_OID_desc object containing the value
118  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
119  *              "\x01\x02\x01\x04"}, corresponding to an
120  * object-identifier value of {iso(1) member-body(2)
121  * Unites States(840) mit(113554) infosys(1) gssapi(2)
122  * generic(1) service_name(4)}.  The constant
123  * GSS_C_NT_HOSTBASED_SERVICE should be initialized
124  * to point to that gss_OID_desc.
125  */
126 static gss_OID_desc gss_c_nt_hostbased_service_oid_desc =
127     {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12" "\x01\x02\x01\x04")};
128
129 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_HOSTBASED_SERVICE =
130     &gss_c_nt_hostbased_service_oid_desc;
131
132 /*
133  * The implementation must reserve static storage for a
134  * gss_OID_desc object containing the value
135  * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
136  * corresponding to an object identifier value of
137  * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
138  * 6(nametypes), 3(gss-anonymous-name)}.  The constant
139  * and GSS_C_NT_ANONYMOUS should be initialized to point
140  * to that gss_OID_desc.
141  */
142
143 static gss_OID_desc gss_c_nt_anonymous_oid_desc =
144     {6, rk_UNCONST("\x2b\x06\01\x05\x06\x03")};
145
146 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_ANONYMOUS =
147     &gss_c_nt_anonymous_oid_desc;
148
149 /*
150  * The implementation must reserve static storage for a
151  * gss_OID_desc object containing the value
152  * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
153  * corresponding to an object-identifier value of
154  * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
155  * 6(nametypes), 4(gss-api-exported-name)}.  The constant
156  * GSS_C_NT_EXPORT_NAME should be initialized to point
157  * to that gss_OID_desc.
158  */
159
160 static gss_OID_desc gss_c_nt_export_name_oid_desc =
161     {6, rk_UNCONST("\x2b\x06\x01\x05\x06\x04") };
162
163 gss_OID GSSAPI_LIB_VARIABLE GSS_C_NT_EXPORT_NAME =
164     &gss_c_nt_export_name_oid_desc;
165
166 /*
167  *   This name form shall be represented by the Object Identifier {iso(1)
168  *   member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
169  *   krb5(2) krb5_name(1)}.  The recommended symbolic name for this type
170  *   is "GSS_KRB5_NT_PRINCIPAL_NAME".
171  */
172
173 static gss_OID_desc gss_krb5_nt_principal_name_oid_desc =
174     {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01") };
175
176 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_NT_PRINCIPAL_NAME =
177     &gss_krb5_nt_principal_name_oid_desc;
178
179 /*
180  *   This name form shall be represented by the Object Identifier {iso(1)
181  *   member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
182  *   generic(1) user_name(1)}.  The recommended symbolic name for this
183  *   type is "GSS_KRB5_NT_USER_NAME".
184  */
185
186 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_NT_USER_NAME =
187     &gss_c_nt_user_name_oid_desc;
188
189 /*
190  *   This name form shall be represented by the Object Identifier {iso(1)
191  *   member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
192  *   generic(1) machine_uid_name(2)}.  The recommended symbolic name for
193  *   this type is "GSS_KRB5_NT_MACHINE_UID_NAME".
194  */
195
196 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_NT_MACHINE_UID_NAME =
197     &gss_c_nt_machine_uid_name_oid_desc;
198
199 /*
200  *   This name form shall be represented by the Object Identifier {iso(1)
201  *   member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
202  *   generic(1) string_uid_name(3)}.  The recommended symbolic name for
203  *   this type is "GSS_KRB5_NT_STRING_UID_NAME".
204  */
205
206 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_NT_STRING_UID_NAME =
207     &gss_c_nt_string_uid_name_oid_desc;
208
209 /*
210  *   To support ongoing experimentation, testing, and evolution of the
211  *   specification, the Kerberos V5 GSS-API mechanism as defined in this
212  *   and any successor memos will be identified with the following Object
213  *   Identifier, as defined in RFC-1510, until the specification is
214  *   advanced to the level of Proposed Standard RFC:
215  *
216  *   {iso(1), org(3), dod(5), internet(1), security(5), kerberosv5(2)}
217  *
218  *   Upon advancement to the level of Proposed Standard RFC, the Kerberos
219  *   V5 GSS-API mechanism will be identified by an Object Identifier
220  *   having the value:
221  *
222  *   {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
223  *   gssapi(2) krb5(2)}
224  */
225
226 #if 0 /* This is the old OID */
227
228 static gss_OID_desc gss_krb5_mechanism_oid_desc =
229     {5, rk_UNCONST("\x2b\x05\x01\x05\x02")};
230
231 #endif
232
233 static gss_OID_desc gss_krb5_mechanism_oid_desc =
234     {9, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02") };
235
236 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_MECHANISM =
237     &gss_krb5_mechanism_oid_desc;
238
239 /*
240  * draft-ietf-cat-iakerb-09, IAKERB:
241  *   The mechanism ID for IAKERB proxy GSS-API Kerberos, in accordance
242  *   with the mechanism proposed by SPNEGO [7] for negotiating protocol
243  *   variations, is:  {iso(1) org(3) dod(6) internet(1) security(5)
244  *   mechanisms(5) iakerb(10) iakerbProxyProtocol(1)}.  The proposed
245  *   mechanism ID for IAKERB minimum messages GSS-API Kerberos, in
246  *   accordance with the mechanism proposed by SPNEGO for negotiating
247  *   protocol variations, is: {iso(1) org(3) dod(6) internet(1)
248  *   security(5) mechanisms(5) iakerb(10)
249  *   iakerbMinimumMessagesProtocol(2)}.
250  */
251
252 static gss_OID_desc gss_iakerb_proxy_mechanism_oid_desc =
253     {7, rk_UNCONST("\x2b\x06\x01\x05\x05\x0a\x01")};
254
255 gss_OID GSSAPI_LIB_VARIABLE GSS_IAKERB_PROXY_MECHANISM =
256     &gss_iakerb_proxy_mechanism_oid_desc;
257
258 static gss_OID_desc gss_iakerb_min_msg_mechanism_oid_desc =
259     {7, rk_UNCONST("\x2b\x06\x01\x05\x05\x0a\x02") };
260
261 gss_OID GSSAPI_LIB_VARIABLE GSS_IAKERB_MIN_MSG_MECHANISM =
262     &gss_iakerb_min_msg_mechanism_oid_desc;
263
264 /*
265  *
266  */
267
268 static gss_OID_desc gss_c_peer_has_updated_spnego_oid_desc =
269     {9, (void *)"\x2b\x06\x01\x04\x01\xa9\x4a\x13\x05"};
270
271 gss_OID GSSAPI_LIB_VARIABLE GSS_C_PEER_HAS_UPDATED_SPNEGO =
272     &gss_c_peer_has_updated_spnego_oid_desc;
273
274 /*
275  * 1.2.752.43.13 Heimdal GSS-API Extentions
276  */
277
278 /* 1.2.752.43.13.1 */
279 static gss_OID_desc gss_krb5_copy_ccache_x_oid_desc =
280     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x01")};
281
282 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_COPY_CCACHE_X =
283     &gss_krb5_copy_ccache_x_oid_desc;
284
285 /* 1.2.752.43.13.2 */
286 static gss_OID_desc gss_krb5_get_tkt_flags_x_oid_desc =
287     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x02")};
288
289 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_TKT_FLAGS_X =
290     &gss_krb5_get_tkt_flags_x_oid_desc;
291
292 /* 1.2.752.43.13.3 */
293 static gss_OID_desc gss_krb5_extract_authz_data_from_sec_context_x_oid_desc =
294     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x03")};
295
296 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_EXTRACT_AUTHZ_DATA_FROM_SEC_CONTEXT_X =
297     &gss_krb5_extract_authz_data_from_sec_context_x_oid_desc;
298
299 /* 1.2.752.43.13.4 */
300 static gss_OID_desc gss_krb5_compat_des3_mic_x_oid_desc =
301     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x04")};
302
303 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_COMPAT_DES3_MIC_X =
304     &gss_krb5_compat_des3_mic_x_oid_desc;
305
306 /* 1.2.752.43.13.5 */
307 static gss_OID_desc gss_krb5_register_acceptor_identity_x_desc =
308     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x05")};
309
310 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_REGISTER_ACCEPTOR_IDENTITY_X =
311     &gss_krb5_register_acceptor_identity_x_desc;
312
313 /* 1.2.752.43.13.6 */
314 static gss_OID_desc gss_krb5_export_lucid_context_x_desc =
315     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x06")};
316
317 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_EXPORT_LUCID_CONTEXT_X =
318     &gss_krb5_export_lucid_context_x_desc;
319
320 /* 1.2.752.43.13.6.1 */
321 static gss_OID_desc gss_krb5_export_lucid_context_v1_x_desc =
322     {7, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x06\x01")};
323
324 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_EXPORT_LUCID_CONTEXT_V1_X =
325     &gss_krb5_export_lucid_context_v1_x_desc;
326
327 /* 1.2.752.43.13.7 */
328 static gss_OID_desc gss_krb5_set_dns_canonicalize_x_desc =
329     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x07")};
330
331 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_SET_DNS_CANONICALIZE_X =
332     &gss_krb5_set_dns_canonicalize_x_desc;
333
334 /* 1.2.752.43.13.8 */
335 static gss_OID_desc gss_krb5_get_subkey_x_desc =
336     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x08")};
337
338 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_SUBKEY_X =
339     &gss_krb5_get_subkey_x_desc;
340
341 /* 1.2.752.43.13.9 */
342 static gss_OID_desc gss_krb5_get_initiator_subkey_x_desc =
343     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x09")};
344
345 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_INITIATOR_SUBKEY_X =
346     &gss_krb5_get_initiator_subkey_x_desc;
347
348 /* 1.2.752.43.13.10 */
349 static gss_OID_desc gss_krb5_get_acceptor_subkey_x_desc =
350     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x0a")};
351
352 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_ACCEPTOR_SUBKEY_X =
353     &gss_krb5_get_acceptor_subkey_x_desc;
354
355 /* 1.2.752.43.13.11 */
356 static gss_OID_desc gss_krb5_send_to_kdc_x_desc =
357     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x0b")};
358
359 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_SEND_TO_KDC_X =
360     &gss_krb5_send_to_kdc_x_desc;
361
362 /* 1.2.752.43.13.12 */
363 static gss_OID_desc gss_krb5_get_authtime_x_desc =
364     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x0c")};
365
366 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_AUTHTIME_X =
367     &gss_krb5_get_authtime_x_desc;
368
369 /* 1.2.752.43.13.13 */
370 static gss_OID_desc gss_krb5_get_service_keyblock_x_desc =
371     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x0d")};
372
373 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_SERVICE_KEYBLOCK_X =
374     &gss_krb5_get_service_keyblock_x_desc;
375
376 /* 1.2.752.43.13.14 */
377 static gss_OID_desc gss_krb5_set_allowable_enctypes_x_desc =
378     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x0e")};
379
380 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_SET_ALLOWABLE_ENCTYPES_X =
381     &gss_krb5_set_allowable_enctypes_x_desc;
382
383 /* 1.2.752.43.13.15 */
384 static gss_OID_desc gss_krb5_set_default_realm_x_desc =
385     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x0f")};
386
387 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_SET_DEFAULT_REALM_X =
388     &gss_krb5_set_default_realm_x_desc;
389
390 /* 1.2.752.43.13.16 */
391 static gss_OID_desc gss_krb5_ccache_name_x_desc =
392     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x10")};
393
394 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_CCACHE_NAME_X =
395     &gss_krb5_ccache_name_x_desc;
396
397 /* 1.2.752.43.13.17 */
398 static gss_OID_desc gss_krb5_set_time_offset_x_desc =
399     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x11")};
400
401 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_SET_TIME_OFFSET_X =
402     &gss_krb5_set_time_offset_x_desc;
403
404 /* 1.2.752.43.13.18 */
405 static gss_OID_desc gss_krb5_get_time_offset_x_desc =
406     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x12")};
407
408 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_GET_TIME_OFFSET_X =
409     &gss_krb5_get_time_offset_x_desc;
410
411 /* 1.2.752.43.13.19 */
412 static gss_OID_desc gss_krb5_plugin_register_x_desc =
413     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x13")};
414
415 gss_OID GSSAPI_LIB_VARIABLE GSS_KRB5_PLUGIN_REGISTER_X =
416     &gss_krb5_plugin_register_x_desc;
417
418 /* 1.2.752.43.14.1 */
419 static gss_OID_desc gss_sasl_digest_md5_mechanism_desc =
420     {6, rk_UNCONST("\x2a\x85\x70\x2b\x0e\x01") };
421
422 gss_OID GSSAPI_LIB_VARIABLE GSS_SASL_DIGEST_MD5_MECHANISM =
423     &gss_sasl_digest_md5_mechanism_desc;
424
425 /*
426  * Context for krb5 calls.
427  */
428
429 /*
430  *
431  */
432
433 static gssapi_mech_interface_desc krb5_mech = {
434     GMI_VERSION,
435     "kerberos 5",
436     {9, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" },
437     _gsskrb5_acquire_cred,
438     _gsskrb5_release_cred,
439     _gsskrb5_init_sec_context,
440     _gsskrb5_accept_sec_context,
441     _gsskrb5_process_context_token,
442     _gsskrb5_delete_sec_context,
443     _gsskrb5_context_time,
444     _gsskrb5_get_mic,
445     _gsskrb5_verify_mic,
446     _gsskrb5_wrap,
447     _gsskrb5_unwrap,
448     _gsskrb5_display_status,
449     _gsskrb5_indicate_mechs,
450     _gsskrb5_compare_name,
451     _gsskrb5_display_name,
452     _gsskrb5_import_name,
453     _gsskrb5_export_name,
454     _gsskrb5_release_name,
455     _gsskrb5_inquire_cred,
456     _gsskrb5_inquire_context,
457     _gsskrb5_wrap_size_limit,
458     _gsskrb5_add_cred,
459     _gsskrb5_inquire_cred_by_mech,
460     _gsskrb5_export_sec_context,
461     _gsskrb5_import_sec_context,
462     _gsskrb5_inquire_names_for_mech,
463     _gsskrb5_inquire_mechs_for_name,
464     _gsskrb5_canonicalize_name,
465     _gsskrb5_duplicate_name,
466     _gsskrb5_inquire_sec_context_by_oid,
467     _gsskrb5_inquire_cred_by_oid,
468     _gsskrb5_set_sec_context_option,
469     _gsskrb5_set_cred_option,
470     _gsskrb5_pseudo_random,
471     _gk_wrap_iov,
472     _gk_unwrap_iov,
473     _gk_wrap_iov_length
474 };
475
476 gssapi_mech_interface
477 __gss_krb5_initialize(void)
478 {
479     return &krb5_mech;
480 }