Generic Security Services API Library Functions
gss_inquire_context(3GSS)
NAME
gss_inquire_context - obtain information about a security
contextSYNOPSIS
cc [ flag... ] file... -lgss [ library... ]
#include
OM_uint32 gss_inquire_context(OM_uint32 *minor_status,
const gss_ctx_id_t context_handle,gss_name_t *src_name,
gss_name_t *targ_name, OM_uint32 *lifetime_rec,
gss_OID *mech_type, OM_uint32 *ctx_flags,
int *locally_initiated, int *open);
DESCRIPTION
The gss_inquire_context() function obtains information about
a security context. The caller must already have obtained a handle that refers to the context, although the context need not be fully established.PARAMETERS
The parameter descriptions for gss_inquire_context() are as
follows:minor_status A mechanism-specific status code.
context_handle A handle that refers to the security
context.src_name The name of the context initiator. If
the context was established using anonymous authentication, and if the application invokinggss_inquire_context() is the context
acceptor, an anonymous name is returned. Storage associated with this name must be freed by the application after use with a call togss_release_name(). Specify NULL if the
parameter is not required.targ_name The name of the context acceptor.
Storage associated with this name must be freed by the application after usewith a call to gss_release_name(). If
the context acceptor did not authenti-
cate itself, and if the initiator didSunOS 5.11 Last change: 17 Jan 2003 1
Generic Security Services API Library Functionsgss_inquire_context(3GSS)
not specify a target name in its callto gss_init_sec_context(), the value
GSS_C_NO_NAME is returned. Specify NULL
if the parameter is not required.lifetime_rec The number of seconds for which the
context will remain valid. If the con-
text has expired, this parameter will be set to zero. Specify NULL if the parameter is not required.mech_type The security mechanism providing the
context. The returned OID is a pointer to static storage that should betreated as read-only by the applica-
tion; in particular, the application should not attempt to free it. Specify NULL if the parameter is not required.ctx_flags Contains various independent flags,
each of which indicates that the con-
text supports (or is expected to sup-
port, if ctx_open is false) a specific
service option. If not needed, specify NULL. Symbolic names are provided for each flag, and the symbolic names corresponding to the required flags should be logically ANDed with theret_flags value to test whether a given
option is supported by the context. The flags are:GSS_C_DELEG_FLAG If true,
credentials were delegatedfrom the ini-
tiator to the acceptor. If false, no credentials were delegated.GSS_C_MUTUAL_FLAG If true, the
acceptor was authenticated to theSunOS 5.11 Last change: 17 Jan 2003 2
Generic Security Services API Library Functionsgss_inquire_context(3GSS)
initiator. If false, the acceptor didnot authenti-
cate itself.GSS_C_REPLAY_FLAG If true, the
replay of pro-
tected mes-
sages will be detected. If false,replayed mes-
sages will not be detected.GSS_C_SEQUENCE_FLAG If true, out-
of-sequence
protected mes-
sages will be detected. Iffalse, out-
of-sequence
messages will not be detected.GSS_C_CONF_FLAG If true, con-
fidential ser-
vice may be invoked by calling thegss_wrap(3GSS)
routine. Iffalse, no con-
fidential ser-
vice is avail-
able throughgss_wrap().
gss_wrap()
provides mes-
sage encapsu-
lation, data-
origin authen-
tication, andintegrity ser-
vices only.SunOS 5.11 Last change: 17 Jan 2003 3
Generic Security Services API Library Functionsgss_inquire_context(3GSS)
GSS_C_INTEG_FLAG If true,
integrity ser-
vice can be invoked by calling either thegss_get_mic()
or thegss_wrap()
routine. Iffalse, per-
messageintegrity ser-
vice is una-
vailable.GSS_C_ANON_FLAG If true, the
initiator's identity is not revealedto the accep-
tor. Thesrc_name
parameter, if requested, contains an anonymous internal name. If false, the initiator hasbeen authenti-
cated nor-
mally.GSS_C_PROT_READY_FLAG If true, the
protection services, as specified by the states of theGSS_C_CONF_FLAG
andGSS_C_INTEG_FLAG,
are available for use. If false, they are available only if the context isSunOS 5.11 Last change: 17 Jan 2003 4
Generic Security Services API Library Functionsgss_inquire_context(3GSS)
fully esta-
blished, that is, if the open parameteris non-zero.
GSS_C_TRANS_FLAG If true,
resultantsecurity con-
text can be transferred to other processes through a call togss_export_sec_context().
If false, thesecurity con-
text is not transferable.locally_initiated Non-zero if the invoking application is
the context initiator. Specify NULL if the parameter is not required.open Non-zero if the context is fully esta-
blished; zero if a context-
establishment token is expected from the peer application. Specify NULL if the parameter is not required.ERRORS
gss_inquire_context() returns one of the following status
codes:GSS_S_COMPLETE Successful completion.
GSS_S_NO_CONTEXT The referenced context could not be
accessed.GSS_S_FAILURE The underlying mechanism detected an
error for which no specific GSS statuscode is defined. The mechanism-specific
status code reported by means of theSunOS 5.11 Last change: 17 Jan 2003 5
Generic Security Services API Library Functionsgss_inquire_context(3GSS)
minor_status parameter details the error
condition.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________________|
| Availability | system/library/security/gss (32-bit)|
|_____________________________|_____________________________________|
| | SUNWgssx (64-bit) |
|_____________________________|_____________________________________|
| MT-Level | Safe |
|_____________________________|_____________________________________|
SEE ALSO
gss_accept_sec_context(3GSS), gss_context_time(3GSS),
gss_delete_sec_context(3GSS), gss_export_sec_context(3GSS),
gss_import_sec_context(3GSS), gss_init_sec_context(3GSS),
gss_process_context_token(3GSS), gss_wrap(3GSS),
gss_wrap_size_limit(3GSS), attributes(5)
Oracle Solaris Security for Developers GuideSunOS 5.11 Last change: 17 Jan 2003 6
Generic Security Services API Library Functionsgss_inquire_context(3GSS)
SunOS 5.11 Last change: 17 Jan 2003 7