gss_init_sec_context.3 (2010 09)

g
gss_init_sec_context(3) gss_init_sec_context(3)
NAME
gss_init_sec_context() - establish a security context between the context initiator and a context acceptor
SYNOPSIS
#include <gssapi.h>
OM_uint32 gss_init_sec_context (
OM_uint32 *minor_status,
const gss_cred_id_t claimant_cred_handle,
gss_ctx_id_t *context_handle,
gss_name_t target_name,
const gss_OID mech_type,
int req_flags,
int time_req,
const gss_channel_bindings_t input_channel_bindings,
const gss_buffer_t input_token,
gss_OID *actual_mech_types,
gss_buffer_t output_token,
int *ret_flags,
OM_int32 *time_rec)
DESCRIPTION
The gss_init_sec_context()
routine is the first step in the establishment of a security context
between the context initiator and the context acceptor. To ensure the portability of the application, use
its default credential by supplying
GSS_C_NO_CREDENTIAL
to the claimant_cred_handle parameter.
Specify an explicit credential when the application needs an additional credential; for example, to use
delegation.
The first time the application calls the
gss_init_sec_context()
routine, specify the input_token
parameter as
GSS_NO_BUFFER. Calls to the routine can return an output_token for transfer to the con-
text acceptor. The context acceptor presents the token to the
gss_accept_sec_context()
routine.
If the context initiator does not require a token,
gss_init_sec_context()
sets the length field of
the output_token argument to 0 (zero).
To complete establishing the context, the calling application can require one or more reply tokens from
the context acceptor. If the application requires reply tokens, the
gss_init_sec_context()
routine
returns a status value of
GSS_S_CONTINUE_NEEDED
. The application calls the routine again when the
reply token is received from the context acceptor and passes the token to the
gss_init_sec_context()
routine via the input_token parameter.
The values returned by the ret_flags and time_rec parameters are not defined unless the routine returns
the status
GSS_S_COMPLETE
.
If the initial call of
gss_init_sec_context()
fails, the call should not create a context object, and
should leave the value of the context_handle parameter set to
GSS_C_NO_CONTEXT
to indicate this.
Input Parameters
claimant_cred_handle Specifies an optional handle for the credential. To use the default credential, sup-
ply
GSS_C_NO_CREDENTIAL. The credential handle created refers to the DCE
default login context. If no default initiator is defined, the function will return
GSS_S_NO_CRED.
target_name Specifies the name of the context acceptor.
mech_type Specifies the security mechanism. Supply
GSS_C_NO_OID to obtain an imple-
mentation specific default.
req_flags Specifies independent flags, each of which requests that the context support a ser-
vice option. The following symbolic names are provided to correspond to each
flag. The symbolic names should be logically ORed to form a bit-mask value.
GSS_C_DELEG_FLAG. The True/False values are:
True Credentials were delegated to the context acceptor.
False No credentials were delegated.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)