GSS-API provides a function, gss_inquire_context(3GSS), that obtains information about a given security context. Note that the context does not need to be complete. Given a context handle, gss_inquire_context() provides the following information about context:
Name of the context initiator
Name of the context acceptor
Number of seconds for which the context is valid
Security mechanism to be used with the context
Several context-parameter flags. These flags are the same as the ret_flags argument of the gss_accept_sec_context(3GSS) function. The flags cover delegation, mutual authentication, and so on. See Accepting a Context in GSS-API.
A flag that indicates whether the inquiring application is the context initiator
A flag that indicates whether the context is fully established