1*afab4e30Schristos.\" $NetBSD: gss_acquire_cred.3,v 1.5 2023/06/19 21:41:42 christos Exp $ 2ca1c9b0cSelric.\" 3ca1c9b0cSelric.\" Copyright (c) 2003 - 2007 Kungliga Tekniska Högskolan 4ca1c9b0cSelric.\" (Royal Institute of Technology, Stockholm, Sweden). 5ca1c9b0cSelric.\" All rights reserved. 6ca1c9b0cSelric.\" 7ca1c9b0cSelric.\" Redistribution and use in source and binary forms, with or without 8ca1c9b0cSelric.\" modification, are permitted provided that the following conditions 9ca1c9b0cSelric.\" are met: 10ca1c9b0cSelric.\" 11ca1c9b0cSelric.\" 1. Redistributions of source code must retain the above copyright 12ca1c9b0cSelric.\" notice, this list of conditions and the following disclaimer. 13ca1c9b0cSelric.\" 14ca1c9b0cSelric.\" 2. Redistributions in binary form must reproduce the above copyright 15ca1c9b0cSelric.\" notice, this list of conditions and the following disclaimer in the 16ca1c9b0cSelric.\" documentation and/or other materials provided with the distribution. 17ca1c9b0cSelric.\" 18ca1c9b0cSelric.\" 3. Neither the name of the Institute nor the names of its contributors 19ca1c9b0cSelric.\" may be used to endorse or promote products derived from this software 20ca1c9b0cSelric.\" without specific prior written permission. 21ca1c9b0cSelric.\" 22ca1c9b0cSelric.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 23ca1c9b0cSelric.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24ca1c9b0cSelric.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25ca1c9b0cSelric.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 26ca1c9b0cSelric.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27ca1c9b0cSelric.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28ca1c9b0cSelric.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29ca1c9b0cSelric.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30ca1c9b0cSelric.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31ca1c9b0cSelric.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32ca1c9b0cSelric.\" SUCH DAMAGE. 33ca1c9b0cSelric.\" 34b40995a4Selric.\" Id 35ca1c9b0cSelric.\" 36ca1c9b0cSelric.Dd October 26, 2005 37ca1c9b0cSelric.Dt GSS_ACQUIRE_CRED 3 38ca1c9b0cSelric.Os 39ca1c9b0cSelric.Sh NAME 40ca1c9b0cSelric.Nm gss_accept_sec_context , 41ca1c9b0cSelric.Nm gss_acquire_cred , 42ca1c9b0cSelric.Nm gss_add_cred , 43ca1c9b0cSelric.Nm gss_add_oid_set_member , 44ca1c9b0cSelric.Nm gss_canonicalize_name , 45ca1c9b0cSelric.Nm gss_compare_name , 46ca1c9b0cSelric.Nm gss_context_time , 47ca1c9b0cSelric.Nm gss_create_empty_oid_set , 48ca1c9b0cSelric.Nm gss_delete_sec_context , 49ca1c9b0cSelric.Nm gss_display_name , 50ca1c9b0cSelric.Nm gss_display_status , 51ca1c9b0cSelric.Nm gss_duplicate_name , 52ca1c9b0cSelric.Nm gss_export_name , 53ca1c9b0cSelric.Nm gss_export_sec_context , 54ca1c9b0cSelric.Nm gss_get_mic , 55ca1c9b0cSelric.Nm gss_import_name , 56ca1c9b0cSelric.Nm gss_import_sec_context , 57ca1c9b0cSelric.Nm gss_indicate_mechs , 58ca1c9b0cSelric.Nm gss_init_sec_context , 59ca1c9b0cSelric.Nm gss_inquire_context , 60ca1c9b0cSelric.Nm gss_inquire_cred , 61ca1c9b0cSelric.Nm gss_inquire_cred_by_mech , 62ca1c9b0cSelric.Nm gss_inquire_mechs_for_name , 63ca1c9b0cSelric.Nm gss_inquire_names_for_mech , 64ca1c9b0cSelric.Nm gss_krb5_ccache_name , 65ca1c9b0cSelric.Nm gss_krb5_compat_des3_mic , 66ca1c9b0cSelric.Nm gss_krb5_copy_ccache , 67ca1c9b0cSelric.Nm gss_krb5_import_cred 68ca1c9b0cSelric.Nm gsskrb5_extract_authz_data_from_sec_context , 69ca1c9b0cSelric.Nm gsskrb5_register_acceptor_identity , 70ca1c9b0cSelric.Nm gss_krb5_import_ccache , 71ca1c9b0cSelric.Nm gss_krb5_get_tkt_flags , 72ca1c9b0cSelric.Nm gss_process_context_token , 73ca1c9b0cSelric.Nm gss_release_buffer , 74ca1c9b0cSelric.Nm gss_release_cred , 75ca1c9b0cSelric.Nm gss_release_name , 76ca1c9b0cSelric.Nm gss_release_oid_set , 77ca1c9b0cSelric.Nm gss_seal , 78ca1c9b0cSelric.Nm gss_sign , 79ca1c9b0cSelric.Nm gss_test_oid_set_member , 80ca1c9b0cSelric.Nm gss_unseal , 81ca1c9b0cSelric.Nm gss_unwrap , 82ca1c9b0cSelric.Nm gss_verify , 83ca1c9b0cSelric.Nm gss_verify_mic , 84ca1c9b0cSelric.Nm gss_wrap , 85ca1c9b0cSelric.Nm gss_wrap_size_limit 86ca1c9b0cSelric.Nd Generic Security Service Application Program Interface library 87ca1c9b0cSelric.Sh LIBRARY 88ca1c9b0cSelricGSS-API library (libgssapi, -lgssapi) 89ca1c9b0cSelric.Sh SYNOPSIS 90ca1c9b0cSelric.In gssapi/gssapi.h 91ca1c9b0cSelric.Pp 92ca1c9b0cSelric.Ft OM_uint32 93ca1c9b0cSelric.Fo gss_accept_sec_context 94ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 95ca1c9b0cSelric.Fa "gss_ctx_id_t * context_handle" 96d3273b5bSchristos.Fa "gss_const_cred_id_t acceptor_cred_handle" 97ca1c9b0cSelric.Fa "const gss_buffer_t input_token_buffer" 98ca1c9b0cSelric.Fa "const gss_channel_bindings_t input_chan_bindings" 99ca1c9b0cSelric.Fa "gss_name_t * src_name" 100ca1c9b0cSelric.Fa "gss_OID * mech_type" 101ca1c9b0cSelric.Fa "gss_buffer_t output_token" 102ca1c9b0cSelric.Fa "OM_uint32 * ret_flags" 103ca1c9b0cSelric.Fa "OM_uint32 * time_rec" 104ca1c9b0cSelric.Fa "gss_cred_id_t * delegated_cred_handle" 105ca1c9b0cSelric.Fc 106ca1c9b0cSelric.Pp 107ca1c9b0cSelric.Ft OM_uint32 108ca1c9b0cSelric.Fo gss_acquire_cred 109ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 110d3273b5bSchristos.Fa "gss_const_name_t desired_name" 111ca1c9b0cSelric.Fa "OM_uint32 time_req" 112ca1c9b0cSelric.Fa "const gss_OID_set desired_mechs" 113ca1c9b0cSelric.Fa "gss_cred_usage_t cred_usage" 114ca1c9b0cSelric.Fa "gss_cred_id_t * output_cred_handle" 115ca1c9b0cSelric.Fa "gss_OID_set * actual_mechs" 116ca1c9b0cSelric.Fa "OM_uint32 * time_rec" 117ca1c9b0cSelric.Fc 118ca1c9b0cSelric.Ft OM_uint32 119ca1c9b0cSelric.Fo gss_add_cred 120ca1c9b0cSelric.Fa "OM_uint32 *minor_status" 121d3273b5bSchristos.Fa "gss_const_cred_id_t input_cred_handle" 122d3273b5bSchristos.Fa "gss_const_name_t desired_name" 123ca1c9b0cSelric.Fa "const gss_OID desired_mech" 124ca1c9b0cSelric.Fa "gss_cred_usage_t cred_usage" 125ca1c9b0cSelric.Fa "OM_uint32 initiator_time_req" 126ca1c9b0cSelric.Fa "OM_uint32 acceptor_time_req" 127ca1c9b0cSelric.Fa "gss_cred_id_t *output_cred_handle" 128ca1c9b0cSelric.Fa "gss_OID_set *actual_mechs" 129ca1c9b0cSelric.Fa "OM_uint32 *initiator_time_rec" 130ca1c9b0cSelric.Fa "OM_uint32 *acceptor_time_rec" 131ca1c9b0cSelric.Fc 132ca1c9b0cSelric.Ft OM_uint32 133ca1c9b0cSelric.Fo gss_add_oid_set_member 134ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 135ca1c9b0cSelric.Fa "const gss_OID member_oid" 136ca1c9b0cSelric.Fa "gss_OID_set * oid_set" 137ca1c9b0cSelric.Fc 138ca1c9b0cSelric.Ft OM_uint32 139ca1c9b0cSelric.Fo gss_canonicalize_name 140ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 141d3273b5bSchristos.Fa "gss_const_name_t input_name" 142ca1c9b0cSelric.Fa "const gss_OID mech_type" 143ca1c9b0cSelric.Fa "gss_name_t * output_name" 144ca1c9b0cSelric.Fc 145ca1c9b0cSelric.Ft OM_uint32 146ca1c9b0cSelric.Fo gss_compare_name 147ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 148d3273b5bSchristos.Fa "gss_const_name_t name1" 149d3273b5bSchristos.Fa "gss_const_name_t name2" 150ca1c9b0cSelric.Fa "int * name_equal" 151ca1c9b0cSelric.Fc 152ca1c9b0cSelric.Ft OM_uint32 153ca1c9b0cSelric.Fo gss_context_time 154ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 155d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 156ca1c9b0cSelric.Fa "OM_uint32 * time_rec" 157ca1c9b0cSelric.Fc 158ca1c9b0cSelric.Ft OM_uint32 159ca1c9b0cSelric.Fo gss_create_empty_oid_set 160ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 161ca1c9b0cSelric.Fa "gss_OID_set * oid_set" 162ca1c9b0cSelric.Fc 163ca1c9b0cSelric.Ft OM_uint32 164ca1c9b0cSelric.Fo gss_delete_sec_context 165ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 166ca1c9b0cSelric.Fa "gss_ctx_id_t * context_handle" 167ca1c9b0cSelric.Fa "gss_buffer_t output_token" 168ca1c9b0cSelric.Fc 169ca1c9b0cSelric.Ft OM_uint32 170ca1c9b0cSelric.Fo gss_display_name 171ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 172d3273b5bSchristos.Fa "gss_const_name_t input_name" 173ca1c9b0cSelric.Fa "gss_buffer_t output_name_buffer" 174ca1c9b0cSelric.Fa "gss_OID * output_name_type" 175ca1c9b0cSelric.Fc 176ca1c9b0cSelric.Ft OM_uint32 177ca1c9b0cSelric.Fo gss_display_status 178ca1c9b0cSelric.Fa "OM_uint32 *minor_status" 179ca1c9b0cSelric.Fa "OM_uint32 status_value" 180ca1c9b0cSelric.Fa "int status_type" 181ca1c9b0cSelric.Fa "const gss_OID mech_type" 182ca1c9b0cSelric.Fa "OM_uint32 *message_context" 183ca1c9b0cSelric.Fa "gss_buffer_t status_string" 184ca1c9b0cSelric.Fc 185ca1c9b0cSelric.Ft OM_uint32 186ca1c9b0cSelric.Fo gss_duplicate_name 187ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 188d3273b5bSchristos.Fa "gss_const_name_t src_name" 189ca1c9b0cSelric.Fa "gss_name_t * dest_name" 190ca1c9b0cSelric.Fc 191ca1c9b0cSelric.Ft OM_uint32 192ca1c9b0cSelric.Fo gss_export_name 193ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 194d3273b5bSchristos.Fa "gss_const_name_t input_name" 195ca1c9b0cSelric.Fa "gss_buffer_t exported_name" 196ca1c9b0cSelric.Fc 197ca1c9b0cSelric.Ft OM_uint32 198ca1c9b0cSelric.Fo gss_export_sec_context 199ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 200ca1c9b0cSelric.Fa "gss_ctx_id_t * context_handle" 201ca1c9b0cSelric.Fa "gss_buffer_t interprocess_token" 202ca1c9b0cSelric.Fc 203ca1c9b0cSelric.Ft OM_uint32 204ca1c9b0cSelric.Fo gss_get_mic 205ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 206d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 207ca1c9b0cSelric.Fa "gss_qop_t qop_req" 208ca1c9b0cSelric.Fa "const gss_buffer_t message_buffer" 209ca1c9b0cSelric.Fa "gss_buffer_t message_token" 210ca1c9b0cSelric.Fc 211ca1c9b0cSelric.Ft OM_uint32 212ca1c9b0cSelric.Fo gss_import_name 213ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 214ca1c9b0cSelric.Fa "const gss_buffer_t input_name_buffer" 215ca1c9b0cSelric.Fa "const gss_OID input_name_type" 216ca1c9b0cSelric.Fa "gss_name_t * output_name" 217ca1c9b0cSelric.Fc 218ca1c9b0cSelric.Ft OM_uint32 219ca1c9b0cSelric.Fo gss_import_sec_context 220ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 221ca1c9b0cSelric.Fa "const gss_buffer_t interprocess_token" 222ca1c9b0cSelric.Fa "gss_ctx_id_t * context_handle" 223ca1c9b0cSelric.Fc 224ca1c9b0cSelric.Ft OM_uint32 225ca1c9b0cSelric.Fo gss_indicate_mechs 226ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 227ca1c9b0cSelric.Fa "gss_OID_set * mech_set" 228ca1c9b0cSelric.Fc 229ca1c9b0cSelric.Ft OM_uint32 230ca1c9b0cSelric.Fo gss_init_sec_context 231ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 232d3273b5bSchristos.Fa "gss_const_cred_id_t initiator_cred_handle" 233ca1c9b0cSelric.Fa "gss_ctx_id_t * context_handle" 234d3273b5bSchristos.Fa "gss_const_name_t target_name" 235ca1c9b0cSelric.Fa "const gss_OID mech_type" 236ca1c9b0cSelric.Fa "OM_uint32 req_flags" 237ca1c9b0cSelric.Fa "OM_uint32 time_req" 238ca1c9b0cSelric.Fa "const gss_channel_bindings_t input_chan_bindings" 239ca1c9b0cSelric.Fa "const gss_buffer_t input_token" 240ca1c9b0cSelric.Fa "gss_OID * actual_mech_type" 241ca1c9b0cSelric.Fa "gss_buffer_t output_token" 242ca1c9b0cSelric.Fa "OM_uint32 * ret_flags" 243ca1c9b0cSelric.Fa "OM_uint32 * time_rec" 244ca1c9b0cSelric.Fc 245ca1c9b0cSelric.Ft OM_uint32 246ca1c9b0cSelric.Fo gss_inquire_context 247ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 248d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 249ca1c9b0cSelric.Fa "gss_name_t * src_name" 250ca1c9b0cSelric.Fa "gss_name_t * targ_name" 251ca1c9b0cSelric.Fa "OM_uint32 * lifetime_rec" 252ca1c9b0cSelric.Fa "gss_OID * mech_type" 253ca1c9b0cSelric.Fa "OM_uint32 * ctx_flags" 254ca1c9b0cSelric.Fa "int * locally_initiated" 255ca1c9b0cSelric.Fa "int * open_context" 256ca1c9b0cSelric.Fc 257ca1c9b0cSelric.Ft OM_uint32 258ca1c9b0cSelric.Fo gss_inquire_cred 259ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 260d3273b5bSchristos.Fa "gss_const_cred_id_t cred_handle" 261ca1c9b0cSelric.Fa "gss_name_t * name" 262ca1c9b0cSelric.Fa "OM_uint32 * lifetime" 263ca1c9b0cSelric.Fa "gss_cred_usage_t * cred_usage" 264ca1c9b0cSelric.Fa "gss_OID_set * mechanisms" 265ca1c9b0cSelric.Fc 266ca1c9b0cSelric.Ft OM_uint32 267ca1c9b0cSelric.Fo gss_inquire_cred_by_mech 268ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 269d3273b5bSchristos.Fa "gss_const_cred_id_t cred_handle" 270ca1c9b0cSelric.Fa "const gss_OID mech_type" 271ca1c9b0cSelric.Fa "gss_name_t * name" 272ca1c9b0cSelric.Fa "OM_uint32 * initiator_lifetime" 273ca1c9b0cSelric.Fa "OM_uint32 * acceptor_lifetime" 274ca1c9b0cSelric.Fa "gss_cred_usage_t * cred_usage" 275ca1c9b0cSelric.Fc 276ca1c9b0cSelric.Ft OM_uint32 277ca1c9b0cSelric.Fo gss_inquire_mechs_for_name 278ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 279d3273b5bSchristos.Fa "gss_const_name_t input_name" 280ca1c9b0cSelric.Fa "gss_OID_set * mech_types" 281ca1c9b0cSelric.Fc 282ca1c9b0cSelric.Ft OM_uint32 283ca1c9b0cSelric.Fo gss_inquire_names_for_mech 284ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 285ca1c9b0cSelric.Fa "const gss_OID mechanism" 286ca1c9b0cSelric.Fa "gss_OID_set * name_types" 287ca1c9b0cSelric.Fc 288ca1c9b0cSelric.Ft OM_uint32 289ca1c9b0cSelric.Fo gss_krb5_ccache_name 290ca1c9b0cSelric.Fa "OM_uint32 *minor" 291ca1c9b0cSelric.Fa "const char *name" 292ca1c9b0cSelric.Fa "const char **old_name" 293ca1c9b0cSelric.Fc 294ca1c9b0cSelric.Ft OM_uint32 295ca1c9b0cSelric.Fo gss_krb5_copy_ccache 296ca1c9b0cSelric.Fa "OM_uint32 *minor" 297ca1c9b0cSelric.Fa "gss_cred_id_t cred" 298ca1c9b0cSelric.Fa "krb5_ccache out" 299ca1c9b0cSelric.Fc 300ca1c9b0cSelric.Ft OM_uint32 301ca1c9b0cSelric.Fo gss_krb5_import_cred 302ca1c9b0cSelric.Fa "OM_uint32 *minor_status" 303ca1c9b0cSelric.Fa "krb5_ccache id" 304ca1c9b0cSelric.Fa "krb5_principal keytab_principal" 305ca1c9b0cSelric.Fa "krb5_keytab keytab" 306ca1c9b0cSelric.Fa "gss_cred_id_t *cred" 307ca1c9b0cSelric.Fc 308ca1c9b0cSelric.Ft OM_uint32 309ca1c9b0cSelric.Fo gss_krb5_compat_des3_mic 310ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 311ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 312ca1c9b0cSelric.Fa "int onoff" 313ca1c9b0cSelric.Fc 314ca1c9b0cSelric.Ft OM_uint32 315ca1c9b0cSelric.Fo gsskrb5_extract_authz_data_from_sec_context 316ca1c9b0cSelric.Fa "OM_uint32 *minor_status" 317ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 318ca1c9b0cSelric.Fa "int ad_type" 319ca1c9b0cSelric.Fa "gss_buffer_t ad_data" 320ca1c9b0cSelric.Fc 321ca1c9b0cSelric.Ft OM_uint32 322ca1c9b0cSelric.Fo gsskrb5_register_acceptor_identity 323ca1c9b0cSelric.Fa "const char *identity" 324ca1c9b0cSelric.Fc 325ca1c9b0cSelric.Ft OM_uint32 326ca1c9b0cSelric.Fo gss_krb5_import_cache 327ca1c9b0cSelric.Fa "OM_uint32 *minor" 328ca1c9b0cSelric.Fa "krb5_ccache id" 329ca1c9b0cSelric.Fa "krb5_keytab keytab" 330ca1c9b0cSelric.Fa "gss_cred_id_t *cred" 331ca1c9b0cSelric.Fc 332ca1c9b0cSelric.Ft OM_uint32 333ca1c9b0cSelric.Fo gss_krb5_get_tkt_flags 334ca1c9b0cSelric.Fa "OM_uint32 *minor_status" 335ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 336ca1c9b0cSelric.Fa "OM_uint32 *tkt_flags" 337ca1c9b0cSelric.Fc 338ca1c9b0cSelric.Ft OM_uint32 339ca1c9b0cSelric.Fo gss_process_context_token 340ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 341d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 342ca1c9b0cSelric.Fa "const gss_buffer_t token_buffer" 343ca1c9b0cSelric.Fc 344ca1c9b0cSelric.Ft OM_uint32 345ca1c9b0cSelric.Fo gss_release_buffer 346ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 347ca1c9b0cSelric.Fa "gss_buffer_t buffer" 348ca1c9b0cSelric.Fc 349ca1c9b0cSelric.Ft OM_uint32 350ca1c9b0cSelric.Fo gss_release_cred 351ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 352ca1c9b0cSelric.Fa "gss_cred_id_t * cred_handle" 353ca1c9b0cSelric.Fc 354ca1c9b0cSelric.Ft OM_uint32 355ca1c9b0cSelric.Fo gss_release_name 356ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 357ca1c9b0cSelric.Fa "gss_name_t * input_name" 358ca1c9b0cSelric.Fc 359ca1c9b0cSelric.Ft OM_uint32 360ca1c9b0cSelric.Fo gss_release_oid_set 361ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 362ca1c9b0cSelric.Fa "gss_OID_set * set" 363ca1c9b0cSelric.Fc 364ca1c9b0cSelric.Ft OM_uint32 365ca1c9b0cSelric.Fo gss_seal 366ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 367ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 368ca1c9b0cSelric.Fa "int conf_req_flag" 369ca1c9b0cSelric.Fa "int qop_req" 370ca1c9b0cSelric.Fa "gss_buffer_t input_message_buffer" 371ca1c9b0cSelric.Fa "int * conf_state" 372ca1c9b0cSelric.Fa "gss_buffer_t output_message_buffer" 373ca1c9b0cSelric.Fc 374ca1c9b0cSelric.Ft OM_uint32 375ca1c9b0cSelric.Fo gss_sign 376ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 377ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 378ca1c9b0cSelric.Fa "int qop_req" 379ca1c9b0cSelric.Fa "gss_buffer_t message_buffer" 380ca1c9b0cSelric.Fa "gss_buffer_t message_token" 381ca1c9b0cSelric.Fc 382ca1c9b0cSelric.Ft OM_uint32 383ca1c9b0cSelric.Fo gss_test_oid_set_member 384ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 385ca1c9b0cSelric.Fa "const gss_OID member" 386ca1c9b0cSelric.Fa "const gss_OID_set set" 387ca1c9b0cSelric.Fa "int * present" 388ca1c9b0cSelric.Fc 389ca1c9b0cSelric.Ft OM_uint32 390ca1c9b0cSelric.Fo gss_unseal 391ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 392ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 393ca1c9b0cSelric.Fa "gss_buffer_t input_message_buffer" 394ca1c9b0cSelric.Fa "gss_buffer_t output_message_buffer" 395ca1c9b0cSelric.Fa "int * conf_state" 396ca1c9b0cSelric.Fa "int * qop_state" 397ca1c9b0cSelric.Fc 398ca1c9b0cSelric.Ft OM_uint32 399ca1c9b0cSelric.Fo gss_unwrap 400ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 401d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 402ca1c9b0cSelric.Fa "const gss_buffer_t input_message_buffer" 403ca1c9b0cSelric.Fa "gss_buffer_t output_message_buffer" 404ca1c9b0cSelric.Fa "int * conf_state" 405ca1c9b0cSelric.Fa "gss_qop_t * qop_state" 406ca1c9b0cSelric.Fc 407ca1c9b0cSelric.Ft OM_uint32 408ca1c9b0cSelric.Fo gss_verify 409ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 410ca1c9b0cSelric.Fa "gss_ctx_id_t context_handle" 411ca1c9b0cSelric.Fa "gss_buffer_t message_buffer" 412ca1c9b0cSelric.Fa "gss_buffer_t token_buffer" 413ca1c9b0cSelric.Fa "int * qop_state" 414ca1c9b0cSelric.Fc 415ca1c9b0cSelric.Ft OM_uint32 416ca1c9b0cSelric.Fo gss_verify_mic 417ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 418d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 419ca1c9b0cSelric.Fa "const gss_buffer_t message_buffer" 420ca1c9b0cSelric.Fa "const gss_buffer_t token_buffer" 421ca1c9b0cSelric.Fa "gss_qop_t * qop_state" 422ca1c9b0cSelric.Fc 423ca1c9b0cSelric.Ft OM_uint32 424ca1c9b0cSelric.Fo gss_wrap 425ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 426d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 427ca1c9b0cSelric.Fa "int conf_req_flag" 428ca1c9b0cSelric.Fa "gss_qop_t qop_req" 429ca1c9b0cSelric.Fa "const gss_buffer_t input_message_buffer" 430ca1c9b0cSelric.Fa "int * conf_state" 431ca1c9b0cSelric.Fa "gss_buffer_t output_message_buffer" 432ca1c9b0cSelric.Fc 433ca1c9b0cSelric.Ft OM_uint32 434ca1c9b0cSelric.Fo gss_wrap_size_limit 435ca1c9b0cSelric.Fa "OM_uint32 * minor_status" 436d3273b5bSchristos.Fa "gss_const_ctx_id_t context_handle" 437ca1c9b0cSelric.Fa "int conf_req_flag" 438ca1c9b0cSelric.Fa "gss_qop_t qop_req" 439ca1c9b0cSelric.Fa "OM_uint32 req_output_size" 440ca1c9b0cSelric.Fa "OM_uint32 * max_input_size" 441ca1c9b0cSelric.Fc 442ca1c9b0cSelric.Sh DESCRIPTION 443ca1c9b0cSelricGeneric Security Service API (GSS-API) version 2, and its C binding, 444ca1c9b0cSelricis described in 445ca1c9b0cSelric.Li RFC2743 446ca1c9b0cSelricand 447ca1c9b0cSelric.Li RFC2744 . 448ca1c9b0cSelricVersion 1 (deprecated) of the C binding is described in 449ca1c9b0cSelric.Li RFC1509 . 450ca1c9b0cSelric.Pp 451ca1c9b0cSelricHeimdals GSS-API implementation supports the following mechanisms 452ca1c9b0cSelric.Bl -bullet 453ca1c9b0cSelric.It 454ca1c9b0cSelric.Li GSS_KRB5_MECHANISM 455ca1c9b0cSelric.It 456ca1c9b0cSelric.Li GSS_SPNEGO_MECHANISM 457ca1c9b0cSelric.El 458ca1c9b0cSelric.Pp 459ca1c9b0cSelricGSS-API have generic name types that all mechanism are supposed to 460ca1c9b0cSelricimplement (if possible): 461ca1c9b0cSelric.Bl -bullet 462ca1c9b0cSelric.It 463ca1c9b0cSelric.Li GSS_C_NT_USER_NAME 464ca1c9b0cSelric.It 465ca1c9b0cSelric.Li GSS_C_NT_MACHINE_UID_NAME 466ca1c9b0cSelric.It 467ca1c9b0cSelric.Li GSS_C_NT_STRING_UID_NAME 468ca1c9b0cSelric.It 469ca1c9b0cSelric.Li GSS_C_NT_HOSTBASED_SERVICE 470ca1c9b0cSelric.It 471ca1c9b0cSelric.Li GSS_C_NT_ANONYMOUS 472ca1c9b0cSelric.It 473ca1c9b0cSelric.Li GSS_C_NT_EXPORT_NAME 474ca1c9b0cSelric.El 475ca1c9b0cSelric.Pp 476ca1c9b0cSelricGSS-API implementations that supports Kerberos 5 have some additional 477ca1c9b0cSelricname types: 478ca1c9b0cSelric.Bl -bullet 479ca1c9b0cSelric.It 480ca1c9b0cSelric.Li GSS_KRB5_NT_PRINCIPAL_NAME 481ca1c9b0cSelric.It 482ca1c9b0cSelric.Li GSS_KRB5_NT_USER_NAME 483ca1c9b0cSelric.It 484ca1c9b0cSelric.Li GSS_KRB5_NT_MACHINE_UID_NAME 485ca1c9b0cSelric.It 486ca1c9b0cSelric.Li GSS_KRB5_NT_STRING_UID_NAME 487ca1c9b0cSelric.El 488ca1c9b0cSelric.Pp 489ca1c9b0cSelricIn GSS-API, names have two forms, internal names and contiguous string 490ca1c9b0cSelricnames. 491ca1c9b0cSelric.Bl -bullet 492ca1c9b0cSelric.It 493ca1c9b0cSelric.Li Internal name and mechanism name 494ca1c9b0cSelric.Pp 495ca1c9b0cSelricInternal names are implementation specific representation of 496ca1c9b0cSelrica GSS-API name. 497ca1c9b0cSelric.Li Mechanism names 498ca1c9b0cSelricspecial form of internal names corresponds to one and only one mechanism. 499ca1c9b0cSelric.Pp 500ca1c9b0cSelricIn GSS-API an internal name is stored in a 501ca1c9b0cSelric.Dv gss_name_t . 502ca1c9b0cSelric.It 503ca1c9b0cSelric.Li Contiguous string name and exported name 504ca1c9b0cSelric.Pp 505ca1c9b0cSelricContiguous string names are gssapi names stored in a 506ca1c9b0cSelric.Dv OCTET STRING 507ca1c9b0cSelricthat together with a name type identifier (OID) uniquely specifies a 508ca1c9b0cSelricgss-name. 509ca1c9b0cSelricA special form of the contiguous string name is the exported name that 510ca1c9b0cSelrichave a OID embedded in the string to make it unique. 511ca1c9b0cSelricExported name have the nametype 512ca1c9b0cSelric.Dv GSS_C_NT_EXPORT_NAME . 513ca1c9b0cSelric.Pp 514ca1c9b0cSelricIn GSS-API an contiguous string name is stored in a 515ca1c9b0cSelric.Dv gss_buffer_t . 516ca1c9b0cSelric.Pp 517ca1c9b0cSelricExported names also have the property that they are specified by the 5189b5852d0Swizmechanism itself and compatible between different GSS-API 519ca1c9b0cSelricimplementations. 520ca1c9b0cSelric.El 521ca1c9b0cSelric.Sh ACCESS CONTROL 522ca1c9b0cSelricThere are two ways of comparing GSS-API names, either comparing two 523ca1c9b0cSelricinternal names with each other or two contiguous string names with 524ca1c9b0cSelriceither other. 525ca1c9b0cSelric.Pp 526ca1c9b0cSelricTo compare two internal names with each other, import (if needed) the 527ca1c9b0cSelricnames with 528ca1c9b0cSelric.Fn gss_import_name 529ca1c9b0cSelricinto the GSS-API implementation and the compare the imported name with 530ca1c9b0cSelric.Fn gss_compare_name . 531ca1c9b0cSelric.Pp 532ca1c9b0cSelricImporting names can be slow, so when its possible to store exported 533ca1c9b0cSelricnames in the access control list, comparing contiguous string name 534ca1c9b0cSelricmight be better. 535ca1c9b0cSelric.Pp 536ca1c9b0cSelricwhen comparing contiguous string name, first export them into a 537ca1c9b0cSelric.Dv GSS_C_NT_EXPORT_NAME 538ca1c9b0cSelricname with 539ca1c9b0cSelric.Fn gss_export_name 540ca1c9b0cSelricand then compare with 541ca1c9b0cSelric.Xr memcmp 3 . 542ca1c9b0cSelric.Pp 543ca1c9b0cSelricNote that there are might be a difference between the two methods of 544ca1c9b0cSelriccomparing names. 545ca1c9b0cSelricThe first (using 546ca1c9b0cSelric.Fn gss_compare_name ) 547ca1c9b0cSelricwill compare to (unauthenticated) names are the same. 548ca1c9b0cSelricThe second will compare if a mechanism will authenticate them as the 549ca1c9b0cSelricsame principal. 550ca1c9b0cSelric.Pp 551ca1c9b0cSelricFor example, if 552ca1c9b0cSelric.Fn gss_import_name 553ca1c9b0cSelricname was used with 554ca1c9b0cSelric.Dv GSS_C_NO_OID 555ca1c9b0cSelricthe default syntax is used for all mechanism the GSS-API 556ca1c9b0cSelricimplementation supports. 557ca1c9b0cSelricWhen compare the imported name of 558ca1c9b0cSelric.Dv GSS_C_NO_OID 559d3273b5bSchristosit may match several mechanism names (MN). 560ca1c9b0cSelric.Pp 561ca1c9b0cSelricThe resulting name from 562ca1c9b0cSelric.Fn gss_display_name 563ca1c9b0cSelricmust not be used for acccess control. 564ca1c9b0cSelric.Sh FUNCTIONS 565ca1c9b0cSelric.Fn gss_display_name 566ca1c9b0cSelrictakes the gss name in 567ca1c9b0cSelric.Fa input_name 568ca1c9b0cSelricand puts a printable form in 569ca1c9b0cSelric.Fa output_name_buffer . 570ca1c9b0cSelric.Fa output_name_buffer 571ca1c9b0cSelricshould be freed when done using 572ca1c9b0cSelric.Fn gss_release_buffer . 573ca1c9b0cSelric.Fa output_name_type 574ca1c9b0cSelriccan either be 575ca1c9b0cSelric.Dv NULL 576ca1c9b0cSelricor a pointer to a 577ca1c9b0cSelric.Li gss_OID 578ca1c9b0cSelricand will in the latter case contain the OID type of the name. 579ca1c9b0cSelricThe name must only be used for printing. 580ca1c9b0cSelricIf access control is needed, see section 581ca1c9b0cSelric.Sx ACCESS CONTROL . 582ca1c9b0cSelric.Pp 583ca1c9b0cSelric.Fn gss_inquire_context 584ca1c9b0cSelricreturns information about the context. 585ca1c9b0cSelricInformation is available even after the context have expired. 586ca1c9b0cSelric.Fa lifetime_rec 587ca1c9b0cSelricargument is set to 588ca1c9b0cSelric.Dv GSS_C_INDEFINITE 589d3273b5bSchristos(don't expire) or the number of seconds that the context is still valid. 590ca1c9b0cSelricA value of 0 means that the context is expired. 591ca1c9b0cSelric.Fa mech_type 592ca1c9b0cSelricargument should be considered readonly and must not be released. 593ca1c9b0cSelric.Fa src_name 594ca1c9b0cSelricand 595ca1c9b0cSelric.Fn dest_name 596ca1c9b0cSelricare both mechanims names and must be released with 597ca1c9b0cSelric.Fn gss_release_name 598ca1c9b0cSelricwhen no longer used. 599ca1c9b0cSelric.Pp 600ca1c9b0cSelric.Nm gss_context_time 601ca1c9b0cSelricwill return the amount of time (in seconds) of the context is still 602ca1c9b0cSelricvalid. 603ca1c9b0cSelricIf its expired 604ca1c9b0cSelric.Fa time_rec 605ca1c9b0cSelricwill be set to 0 and 606ca1c9b0cSelric.Dv GSS_S_CONTEXT_EXPIRED 607ca1c9b0cSelricreturned. 608ca1c9b0cSelric.Pp 609ca1c9b0cSelric.Fn gss_sign , 610ca1c9b0cSelric.Fn gss_verify , 611ca1c9b0cSelric.Fn gss_seal , 612ca1c9b0cSelricand 613ca1c9b0cSelric.Fn gss_unseal 614ca1c9b0cSelricare part of the GSS-API V1 interface and are obsolete. 615ca1c9b0cSelricThe functions should not be used for new applications. 616ca1c9b0cSelricThey are provided so that version 1 applications can link against the 617ca1c9b0cSelriclibrary. 618ca1c9b0cSelric.Sh EXTENSIONS 619ca1c9b0cSelric.Fn gss_krb5_ccache_name 620ca1c9b0cSelricsets the internal kerberos 5 credential cache name to 621ca1c9b0cSelric.Fa name . 622ca1c9b0cSelricThe old name is returned in 623ca1c9b0cSelric.Fa old_name , 624ca1c9b0cSelricand must not be freed. 625ca1c9b0cSelricThe data allocated for 626ca1c9b0cSelric.Fa old_name 627ca1c9b0cSelricis free upon next call to 628ca1c9b0cSelric.Fn gss_krb5_ccache_name . 629ca1c9b0cSelricThis function is not threadsafe if 630ca1c9b0cSelric.Fa old_name 631ca1c9b0cSelricargument is used. 632ca1c9b0cSelric.Pp 633ca1c9b0cSelric.Fn gss_krb5_copy_ccache 634ca1c9b0cSelricwill extract the krb5 credentials that are transferred from the 635ca1c9b0cSelricinitiator to the acceptor when using token delegation in the Kerberos 636ca1c9b0cSelricmechanism. 637ca1c9b0cSelricThe acceptor receives the delegated token in the last argument to 638ca1c9b0cSelric.Fn gss_accept_sec_context . 639ca1c9b0cSelric.Pp 640ca1c9b0cSelric.Fn gss_krb5_import_cred 641ca1c9b0cSelricwill import the krb5 credentials (both keytab and/or credential cache) 642ca1c9b0cSelricinto gss credential so it can be used withing GSS-API. 643ca1c9b0cSelricThe 644ca1c9b0cSelric.Fa ccache 645ca1c9b0cSelricis copied by reference and thus shared, so if the credential is destroyed 646ca1c9b0cSelricwith 647ca1c9b0cSelric.Fa krb5_cc_destroy , 648ca1c9b0cSelricall users of thep 649ca1c9b0cSelric.Fa gss_cred_id_t 650ca1c9b0cSelricreturned by 651ca1c9b0cSelric.Fn gss_krb5_import_ccache 652ca1c9b0cSelricwill fail. 653ca1c9b0cSelric.Pp 654ca1c9b0cSelric.Fn gsskrb5_register_acceptor_identity 655ca1c9b0cSelricsets the Kerberos 5 filebased keytab that the acceptor will use. The 656ca1c9b0cSelric.Fa identifier 657ca1c9b0cSelricis the file name. 658ca1c9b0cSelric.Pp 659ca1c9b0cSelric.Fn gsskrb5_extract_authz_data_from_sec_context 660ca1c9b0cSelricextracts the Kerberos authorizationdata that may be stored within the 661ca1c9b0cSelriccontext. 662ca1c9b0cSelricTha caller must free the returned buffer 663ca1c9b0cSelric.Fa ad_data 664ca1c9b0cSelricwith 665ca1c9b0cSelric.Fn gss_release_buffer 666ca1c9b0cSelricupon success. 667ca1c9b0cSelric.Pp 668ca1c9b0cSelric.Fn gss_krb5_get_tkt_flags 669ca1c9b0cSelricreturn the ticket flags for the kerberos ticket receive when 670ca1c9b0cSelricauthenticating the initiator. 671ca1c9b0cSelricOnly valid on the acceptor context. 672ca1c9b0cSelric.Pp 673ca1c9b0cSelric.Fn gss_krb5_compat_des3_mic 674ca1c9b0cSelricturns on or off the compatibility with older version of Heimdal using 675ca1c9b0cSelricdes3 get and verify mic, this is way to programmatically set the 676ca1c9b0cSelric[gssapi]broken_des3_mic and [gssapi]correct_des3_mic flags (see 677ca1c9b0cSelricCOMPATIBILITY section in 678ca1c9b0cSelric.Xr gssapi 3 ) . 679ca1c9b0cSelricIf the CPP symbol 680ca1c9b0cSelric.Dv GSS_C_KRB5_COMPAT_DES3_MIC 681ca1c9b0cSelricis present, 682ca1c9b0cSelric.Fn gss_krb5_compat_des3_mic 683ca1c9b0cSelricexists. 684ca1c9b0cSelric.Fn gss_krb5_compat_des3_mic 685ca1c9b0cSelricwill be removed in a later version of the GSS-API library. 686ca1c9b0cSelric.Sh SEE ALSO 687ca1c9b0cSelric.Xr gssapi 3 , 688ca1c9b0cSelric.Xr krb5 3 , 689ca1c9b0cSelric.Xr krb5_ccache 3 , 690ca1c9b0cSelric.Xr kerberos 8 691