PreviousNext

gssdce_cred_to_login_context(3sec)

Obtains the DCE login context associated with a GSSAPI credential

Synopsis

#include <dce/gssapi.h>

OM_uint32 gssdce_cred_to_login_context (
OM_uint32 *minor_status,
cred_id_t *cred_handle,
sec_login_handle_t login_context);

Parameters

Input

cred_handle
Specifies the credential handle.

Output

login_context
Returns the DCE login context associated with the credential.

minor_status
Returns a status code from the security mechanism.

Description
Using the gssdce_cred_to_login_context( ) routine, an application can obtain the DCE login context associated with a GSSAPI credential. Only credentials with usage-types INIT or BOTH have associated login contexts.

Use this routine in the following situations:

· If you want to add delegation notes to a login context

· To use an INITIATE or BOTH credential to initiate an authenticated RPC call

The application must delete the login context when it no longer needs the credentials or the login context.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

GSS_S_COMPLETE The routine was completed successfully.
GSS_S_CREDENTIALS_EXPIRED The credentials have expired.
GSS_S_DEFECTIVE_CREDENTIAL The credential is defective in some way.
GSS_S_FAILURE The routine failed. Check the minor_status parameter for details.
GSS_S_NO_CRED The routine requested the default login context, but no default login context was available.
Related Information
Functions:

gssdce_login_context_to_cred(3sec)

sec_login_purge_context(3sec)

sec_login_release_context(3sec)