Function

gss_inquire_context

Returns information about a security context.

Declaration

OM_uint32 gss_inquire_context(OM_uint32 *minor_status, gss_ctx_id_t context_handle, gss_name_t  _Nullable *src_name, gss_name_t  _Nullable *targ_name, OM_uint32 *lifetime_rec, gss_OID  _Nullable *mech_type, OM_uint32 *ctx_flags, int *locally_initiated, int *xopen);

Parameters

minor_status

A pointer to the secondary status result that provides additional information in case of failure.

context_handle

The context to obtain information about.

src_name

A pointer the function uses to return the name of the initiator. Free the name object's memory with a call to gss_release_name when you are done with it. Specify NULL to ignore this output.

targ_name

A pointer the function uses to return the name of the acceptor. Free the name object's memory with a call to gss_release_name when you are done with it. Specify NULL to ignore this output.

lifetime_rec

A pointer the function uses to return the number of seconds before the context expires, or zero if it has already expired. If the context does not support expiration, it returns GSS_C_INDEFINITE. Specify NULL to ignore this output.

mech_type

A pointer the function uses to return the mechanism providing the context. Do not release the OID object, because it is held in static memory. Specify NULL to ignore this output.

ctx_flags

A pointer the function uses to return the flags associated with the context. See Context Services for a description of available flags. Specify NULL to ignore this output.

locally_initiated

A pointer the function uses to return an indicator of the context's point of origin. The value is zero when the function is called by context's acceptor and non-zero otherwise. Specify NULL to ignore this output.

xopen

A pointer the function uses to return an indicator of the context's current state. The value is non-zero when the context if fully established and zero otherwise. Specify NULL to ignore this output.

Return Value

A status code set to GSS_S_COMPLETE on success. See Function Status for a description of other status outputs.

Discussion

The context must exist but need not be fully established for the inquiry to succeed.

See Also

Inquiry and Limits

gss_context_time

Returns the amount of time remaining before a context expires.

gss_inquire_sec_context_by_oid

Returns information about a particular part of a context.

gss_wrap_size_limit

Returns the largest allowable wrap size for a given set of constraints.