The GSS-API provides a function, gss_inquire_context(), that obtains information about a given security context (even an incomplete one). Given a context handle, gss_inquire_context() provides the following information about it:
The name of the context initiator.
The name of the context acceptor.
The number of seconds for which the context will remain valid.
The security mechanism used with the context.
Several context-parameter flags. These flags are the same as the ret_flags argument of the gss_accept_sec_context() function (see Context Acceptance (Server)), covering delegation, mutual authentication, and so on.
A flag indicating whether or not the inquiring application was the context initiator.
A flag indicating whether or not the context is fully established.
For more information, see the gss_inquire_context(3GSS) man page.