1 .\" Copyright (c) 2003 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" $Id: gss_acquire_cred.3,v 1.8.2.1 2003/04/28 13:41:42 lha Exp $
35 .Dt GSS_ACQUIRE_CRED 3
38 .Nm gss_accept_sec_context ,
39 .Nm gss_acquire_cred ,
41 .Nm gss_add_oid_set_member ,
42 .Nm gss_canonicalize_name ,
43 .Nm gss_compare_name ,
44 .Nm gss_context_time ,
45 .Nm gss_create_empty_oid_set ,
46 .Nm gss_delete_sec_context ,
47 .Nm gss_display_name ,
48 .Nm gss_display_status ,
49 .Nm gss_duplicate_name ,
51 .Nm gss_export_sec_context ,
54 .Nm gss_import_sec_context ,
55 .Nm gss_indicate_mechs ,
56 .Nm gss_init_sec_context ,
57 .Nm gss_inquire_context ,
58 .Nm gss_inquire_cred ,
59 .Nm gss_inquire_cred_by_mech ,
60 .Nm gss_inquire_mechs_for_name ,
61 .Nm gss_inquire_names_for_mech ,
62 .Nm gss_krb5_copy_ccache ,
63 .Nm gss_krb5_compat_des3_mic ,
64 .Nm gss_process_context_token ,
65 .Nm gss_release_buffer ,
66 .Nm gss_release_cred ,
67 .Nm gss_release_name ,
68 .Nm gss_release_oid_set ,
71 .Nm gss_test_oid_set_member ,
77 .Nm gss_wrap_size_limit
78 .Nd Generic Security Service Application Program Interface library
80 GSS-API library (libgssapi, -lgssapi)
85 .Fo gss_accept_sec_context
86 .Fa "OM_uint32 * minor_status"
87 .Fa "gss_ctx_id_t * context_handle"
88 .Fa "const gss_cred_id_t acceptor_cred_handle"
89 .Fa "const gss_buffer_t input_token_buffer"
90 .Fa "const gss_channel_bindings_t input_chan_bindings"
91 .Fa "gss_name_t * src_name"
92 .Fa "gss_OID * mech_type"
93 .Fa "gss_buffer_t output_token"
94 .Fa "OM_uint32 * ret_flags"
95 .Fa "OM_uint32 * time_rec"
96 .Fa "gss_cred_id_t * delegated_cred_handle"
101 .Fa "OM_uint32 * minor_status"
102 .Fa "const gss_name_t desired_name"
103 .Fa "OM_uint32 time_req"
104 .Fa "const gss_OID_set desired_mechs"
105 .Fa "gss_cred_usage_t cred_usage"
106 .Fa "gss_cred_id_t * output_cred_handle"
107 .Fa "gss_OID_set * actual_mechs"
108 .Fa "OM_uint32 * time_rec"
112 .Fo gss_add_oid_set_member
113 .Fa "OM_uint32 * minor_status"
114 .Fa "const gss_OID member_oid"
115 .Fa "gss_OID_set * oid_set"
118 .Fo gss_canonicalize_name
119 .Fa "OM_uint32 * minor_status"
120 .Fa "const gss_name_t input_name"
121 .Fa "const gss_OID mech_type"
122 .Fa "gss_name_t * output_name"
126 .Fa "OM_uint32 * minor_status"
127 .Fa "const gss_name_t name1"
128 .Fa "const gss_name_t name2"
129 .Fa "int * name_equal"
133 .Fa "OM_uint32 * minor_status"
134 .Fa "const gss_ctx_id_t context_handle"
135 .Fa "OM_uint32 * time_rec"
138 .Fo gss_create_empty_oid_set
139 .Fa "OM_uint32 * minor_status"
140 .Fa "gss_OID_set * oid_set"
143 .Fo gss_delete_sec_context
144 .Fa "OM_uint32 * minor_status"
145 .Fa "gss_ctx_id_t * context_handle"
146 .Fa "gss_buffer_t output_token"
150 .Fa "OM_uint32 * minor_status"
151 .Fa "const gss_name_t input_name"
152 .Fa "gss_buffer_t output_name_buffer"
153 .Fa "gss_OID * output_name_type"
156 .Fo gss_display_status
157 .Fa "OM_uint32 *minor_status"
158 .Fa "OM_uint32 status_value"
159 .Fa "int status_type"
160 .Fa "const gss_OID mech_type"
161 .Fa "OM_uint32 *message_context"
162 .Fa "gss_buffer_t status_string"
165 .Fo gss_duplicate_name
166 .Fa "OM_uint32 * minor_status"
167 .Fa "const gss_name_t src_name"
168 .Fa "gss_name_t * dest_name"
172 .Fa "OM_uint32 * minor_status"
173 .Fa "const gss_name_t input_name"
174 .Fa "gss_buffer_t exported_name"
177 .Fo gss_export_sec_context
178 .Fa "OM_uint32 * minor_status"
179 .Fa "gss_ctx_id_t * context_handle"
180 .Fa "gss_buffer_t interprocess_token"
184 .Fa "OM_uint32 * minor_status"
185 .Fa "const gss_ctx_id_t context_handle"
186 .Fa "gss_qop_t qop_req"
187 .Fa "const gss_buffer_t message_buffer"
188 .Fa "gss_buffer_t message_token"
192 .Fa "OM_uint32 * minor_status,
193 .Fa "const gss_buffer_t input_name_buffer"
194 .Fa "const gss_OID input_name_type"
195 .Fa "gss_name_t * output_name"
198 .Fo gss_import_sec_context
199 .Fa "OM_uint32 * minor_status"
200 .Fa "const gss_buffer_t interprocess_token"
201 .Fa "gss_ctx_id_t * context_handle"
204 .Fo gss_indicate_mechs
205 .Fa "OM_uint32 * minor_status"
206 .Fa "gss_OID_set * mech_set"
209 .Fo gss_init_sec_context
210 .Fa "OM_uint32 * minor_status"
211 .Fa "const gss_cred_id_t initiator_cred_handle"
212 .Fa "gss_ctx_id_t * context_handle"
213 .Fa "const gss_name_t target_name"
214 .Fa "const gss_OID mech_type"
215 .Fa "OM_uint32 req_flags"
216 .Fa "OM_uint32 time_req"
217 .Fa "const gss_channel_bindings_t input_chan_bindings"
218 .Fa "const gss_buffer_t input_token"
219 .Fa "gss_OID * actual_mech_type"
220 .Fa "gss_buffer_t output_token"
221 .Fa "OM_uint32 * ret_flags"
222 .Fa "OM_uint32 * time_rec"
225 .Fo gss_inquire_context
226 .Fa "OM_uint32 * minor_status"
227 .Fa "const gss_ctx_id_t context_handle"
228 .Fa "gss_name_t * src_name"
229 .Fa "gss_name_t * targ_name"
230 .Fa "OM_uint32 * lifetime_rec"
231 .Fa "gss_OID * mech_type"
232 .Fa "OM_uint32 * ctx_flags"
233 .Fa "int * locally_initiated"
234 .Fa "int * open_context"
238 .Fa "OM_uint32 * minor_status"
239 .Fa "const gss_cred_id_t cred_handle"
240 .Fa "gss_name_t * name"
241 .Fa "OM_uint32 * lifetime"
242 .Fa "gss_cred_usage_t * cred_usage"
243 .Fa "gss_OID_set * mechanisms"
246 .Fo gss_inquire_cred_by_mech
249 .Fo gss_inquire_mechs_for_name
252 .Fo gss_inquire_names_for_mech
255 .Fo gss_krb5_copy_ccache
256 .Fa "OM_uint32 *minor"
257 .Fa "gss_cred_id_t cred"
258 .Fa "krb5_ccache out"
261 .Fo gss_krb5_compat_des3_mic
262 .Fa "OM_uint32 * minor_status"
263 .Fa "gss_ctx_id_t context_handle"
267 .Fo gss_process_context_token
270 .Fo gss_release_buffer
271 .Fa "OM_uint32 * minor_status"
272 .Fa "gss_buffer_t buffer"
276 .Fa "OM_uint32 * minor_status"
277 .Fa "gss_cred_id_t * cred_handle"
281 .Fa "OM_uint32 * minor_status"
282 .Fa "gss_name_t * input_name"
285 .Fo gss_release_oid_set
286 .Fa "OM_uint32 * minor_status"
287 .Fa "gss_OID_set * set"
291 .Fa "OM_uint32 * minor_status"
292 .Fa "gss_ctx_id_t context_handle"
293 .Fa "int conf_req_flag"
295 .Fa "gss_buffer_t input_message_buffer"
296 .Fa "int * conf_state"
297 .Fa "gss_buffer_t output_message_buffer"
301 .Fa "OM_uint32 * minor_status"
302 .Fa "gss_ctx_id_t context_handle"
304 .Fa "gss_buffer_t message_buffer"
305 .Fa "gss_buffer_t message_token"
308 .Fo gss_test_oid_set_member
309 .Fa "OM_uint32 * minor_status"
310 .Fa "const gss_OID member"
311 .Fa "const gss_OID_set set"
316 .Fa "OM_uint32 * minor_status"
317 .Fa "gss_ctx_id_t context_handle"
318 .Fa "gss_buffer_t input_message_buffer"
319 .Fa "gss_buffer_t output_message_buffer"
320 .Fa "int * conf_state"
321 .Fa "int * qop_state"
325 .Fa "OM_uint32 * minor_status"
326 .Fa "const gss_ctx_id_t context_handle"
327 .Fa "const gss_buffer_t input_message_buffer"
328 .Fa "gss_buffer_t output_message_buffer"
329 .Fa "int * conf_state"
330 .Fa "gss_qop_t * qop_state"
334 .Fa "OM_uint32 * minor_status"
335 .Fa "gss_ctx_id_t context_handle"
336 .Fa "gss_buffer_t message_buffer"
337 .Fa "gss_buffer_t token_buffer"
338 .Fa "int * qop_state"
342 .Fa "OM_uint32 * minor_status"
343 .Fa "const gss_ctx_id_t context_handle"
344 .Fa "const gss_buffer_t message_buffer"
345 .Fa "const gss_buffer_t token_buffer"
346 .Fa "gss_qop_t * qop_state"
350 .Fa "OM_uint32 * minor_status"
351 .Fa "const gss_ctx_id_t context_handle"
352 .Fa "int conf_req_flag"
353 .Fa "gss_qop_t qop_req"
354 .Fa "const gss_buffer_t input_message_buffer"
355 .Fa "int * conf_state"
356 .Fa "gss_buffer_t output_message_buffer"
359 .Fo gss_wrap_size_limit
360 .Fa "OM_uint32 * minor_status"
361 .Fa "const gss_ctx_id_t context_handle"
362 .Fa "int conf_req_flag"
363 .Fa "gss_qop_t qop_req"
364 .Fa "OM_uint32 req_output_size"
365 .Fa "OM_uint32 * max_input_size"
368 Generic Security Service API (GSS-API) version 2, and its C binding,
373 Version 1 (deprecated) of the C binding is described in
376 Heimdals GSS-API implementation supports the following mechanisms
379 .Li GSS_KRB5_MECHANISM
382 GSS-API have generic name types that all mechanism are supposed to
383 implement (if possible)
386 .Li GSS_C_NT_USER_NAME
388 .Li GSS_C_NT_MACHINE_UID_NAME
390 .Li GSS_C_NT_STRING_UID_NAME
392 .Li GSS_C_NT_HOSTBASED_SERVICE
394 .Li GSS_C_NT_ANONYMOUS
396 .Li GSS_C_NT_EXPORT_NAME
399 GSS-API implementations that supports Kerberos 5 have some additional
403 .Li GSS_KRB5_NT_PRINCIPAL_NAME
405 .Li GSS_KRB5_NT_USER_NAME
407 .Li GSS_KRB5_NT_MACHINE_UID_NAME
409 .Li GSS_KRB5_NT_STRING_UID_NAME
413 takes the gss name in
415 and put a printable form in
416 .Fa output_name_buffer .
417 .Fa output_name_buffer
418 should be freed when done using
419 .Fn gss_release_buffer .
425 and will in the later case contain the OID type of the name.
426 The name should only be used for printing.
427 Access control should be done with the result of
428 .Fn gss_export_name .
435 are part of the GSS-API V1 interface and are obsolete. The functions
436 should not be used for new applications.
437 They are provided so that version 1 applications can link against the
440 .Fn gss_krb5_copy_ccache
441 is an extension to the GSS-API API.
442 The function will extract the krb5 credential that are transfered from
443 the initiator to the acceptor when using token delegation in the
445 The acceptor receives the delegated token in the last argument to
446 .Fn gss_accept_sec_context .
448 .Nm gss_krb5_compat_des3_mic
449 turns on or off the compatibly with older version of Heimdal using
450 des3 get and verify mic, this is way to programmatically set the
451 [gssapi]broken_des3_mic and [gssapi]correct_des3_mic flags (see
452 COMPATIBILITY section in
455 .Dv GSS_C_KRB5_COMPAT_DES3_MIC
457 .Nm gss_krb5_compat_des3_mic
459 .Nm gss_krb5_compat_des3_mic
460 will be removed in a later version of the GSS-API library.