Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 2743

Generic Security Service Application Program Interface Version 2, Update 1

Pages: 101
Proposed Standard
Errata
Obsoletes:  2078
Updated by:  5554
Part 2 of 4 – Pages 29 to 62
First   Prev   Next

Top   ToC   RFC2743 - Page 29   prevText

2: Interface Descriptions

This section describes the GSS-API's service interface, dividing the set of calls offered into four groups. Credential management calls are related to the acquisition and release of credentials by principals. Context-level calls are related to the management of security contexts between principals. Per-message calls are related to the protection of individual messages on established security contexts. Support calls provide ancillary functions useful to GSS-API callers. Table 2 groups and summarizes the calls in tabular fashion. Table 2: GSS-API Calls CREDENTIAL MANAGEMENT GSS_Acquire_cred acquire credentials for use GSS_Release_cred release credentials after use GSS_Inquire_cred display information about credentials
Top   ToC   RFC2743 - Page 30
   GSS_Add_cred                 construct credentials incrementally
   GSS_Inquire_cred_by_mech     display per-mechanism credential
                                  information

   CONTEXT-LEVEL CALLS

   GSS_Init_sec_context         initiate outbound security context
   GSS_Accept_sec_context       accept inbound security context
   GSS_Delete_sec_context       flush context when no longer needed
   GSS_Process_context_token    process received control token on
                                  context
   GSS_Context_time             indicate validity time remaining on
                                     context
   GSS_Inquire_context          display information about context
   GSS_Wrap_size_limit          determine GSS_Wrap token size limit
   GSS_Export_sec_context       transfer context to other process
   GSS_Import_sec_context       import transferred context

   PER-MESSAGE CALLS

   GSS_GetMIC                   apply integrity check, receive as
                                  token separate from message
   GSS_VerifyMIC                validate integrity check token
                                  along with message
   GSS_Wrap                     sign, optionally encrypt,
                                  encapsulate
   GSS_Unwrap                   decapsulate, decrypt if needed,
                                  validate integrity check

   SUPPORT CALLS

   GSS_Display_status           translate status codes to printable
                                  form
   GSS_Indicate_mechs           indicate mech_types supported on
                                  local system
   GSS_Compare_name             compare two names for equality
   GSS_Display_name             translate name to printable form
   GSS_Import_name              convert printable name to
                                  normalized form
   GSS_Release_name             free storage of normalized-form
                                  name
   GSS_Release_buffer           free storage of general GSS-allocated
                                  object
   GSS_Release_OID_set          free storage of OID set object
   GSS_Create_empty_OID_set     create empty OID set
   GSS_Add_OID_set_member       add member to OID set
   GSS_Test_OID_set_member      test if OID is member of OID set
   GSS_Inquire_names_for_mech   indicate name types supported by
Top   ToC   RFC2743 - Page 31
                                  mechanism
   GSS_Inquire_mechs_for_name   indicates mechanisms supporting name
                                  type
   GSS_Canonicalize_name        translate name to per-mechanism form
   GSS_Export_name              externalize per-mechanism name
   GSS_Duplicate_name           duplicate name object

2.1: Credential management calls

These GSS-API calls provide functions related to the management of credentials. Their characterization with regard to whether or not they may block pending exchanges with other network entities (e.g., directories or authentication servers) depends in part on OS-specific (extra-GSS-API) issues, so is not specified in this document. The GSS_Acquire_cred() call is defined within the GSS-API in support of application portability, with a particular orientation towards support of portable server applications. It is recognized that (for certain systems and mechanisms) credentials for interactive users may be managed differently from credentials for server processes; in such environments, it is the GSS-API implementation's responsibility to distinguish these cases and the procedures for making this distinction are a local matter. The GSS_Release_cred() call provides a means for callers to indicate to the GSS-API that use of a credentials structure is no longer required. The GSS_Inquire_cred() call allows callers to determine information about a credentials structure. The GSS_Add_cred() call enables callers to append elements to an existing credential structure, allowing iterative construction of a multi-mechanism credential. The GSS_Inquire_cred_by_mech() call enables callers to extract per- mechanism information describing a credentials structure.

2.1.1: GSS_Acquire_cred call

Inputs: o desired_name INTERNAL NAME, -- NULL requests locally-determined -- default o lifetime_req INTEGER, -- in seconds; 0 requests default o desired_mechs SET OF OBJECT IDENTIFIER, -- NULL requests -- system-selected default o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, -- 2=ACCEPT-ONLY
Top   ToC   RFC2743 - Page 32
   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  output_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL,
   -- caller must release with GSS_Release_cred()

   o  actual_mechs SET OF OBJECT IDENTIFIER, -- if returned non-NULL,
   -- caller must release with GSS_Release_oid_set()

   o  lifetime_rec INTEGER -- in seconds, or reserved value for
   -- INDEFINITE

   Return major_status codes:

   o  GSS_S_COMPLETE indicates that requested credentials were
   successfully established, for the duration indicated in lifetime_rec,
   suitable for the usage requested in cred_usage, for the set of
   mech_types indicated in actual_mechs, and that those credentials can
   be referenced for subsequent use with the handle returned in
   output_cred_handle.

   o  GSS_S_BAD_MECH indicates that a mech_type unsupported by the GSS-
   API implementation type was requested, causing the credential
   establishment operation to fail.

   o  GSS_S_BAD_NAMETYPE indicates that the provided desired_name is
   uninterpretable or of a type unsupported by the applicable underlying
   GSS-API mechanism(s), so no credentials could be established for the
   accompanying desired_name.

   o  GSS_S_BAD_NAME indicates that the provided desired_name is
   inconsistent in terms of internally-incorporated type specifier
   information, so no credentials could be established for the
   accompanying desired_name.

   o  GSS_S_CREDENTIALS_EXPIRED indicates that underlying credential
   elements corresponding to the requested desired_name have expired, so
   requested credentials could not be established.

   o GSS_S_NO_CRED indicates that no credential elements corresponding
   to the requested desired_name and usage could be accessed, so
   requested credentials could not be established.  In particular, this
   status should be returned upon temporary user-fixable conditions
Top   ToC   RFC2743 - Page 33
   preventing successful credential establishment and upon lack of
   authorization to establish and use credentials associated with the
   identity named in the input desired_name argument.

   o  GSS_S_FAILURE indicates that credential establishment failed for
   reasons unspecified at the GSS-API level.

   GSS_Acquire_cred() is used to acquire credentials so that a principal
   can (as a function of the input cred_usage parameter) initiate and/or
   accept security contexts under the identity represented by the
   desired_name input argument. On successful completion, the returned
   output_cred_handle result provides a handle for subsequent references
   to the acquired credentials.  Typically, single-user client processes
   requesting that default credential behavior be applied for context
   establishment purposes will have no need to invoke this call.

   A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name,
   which will be interpreted as a request for a credential handle that
   will invoke default behavior when passed to GSS_Init_sec_context(),
   if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or
   GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or
   GSS_C_BOTH.  It is possible that multiple pre-established credentials
   may exist for the same principal identity (for example, as a result
   of multiple user login sessions) when GSS_Acquire_cred() is called;
   the means used in such cases to select a specific credential are
   local matters.  The input lifetime_req argument to GSS_Acquire_cred()
   may provide useful information for local GSS-API implementations to
   employ in making this disambiguation in a manner which will best
   satisfy a caller's intent.

   This routine is expected to be used primarily by context acceptors,
   since implementations are likely to provide mechanism-specific ways
   of obtaining GSS-API initiator credentials from the system login
   process.  Some implementations may therefore not support the
   acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via
   GSS_Acquire_cred() for any name other than GSS_C_NO_NAME, or a name
   resulting from applying GSS_Inquire_context() to an active context,
   or a name resulting from applying GSS_Inquire_cred() against a
   credential handle corresponding to default behavior. It is important
   to recognize that the explicit name which is yielded by resolving a
   default reference may change over time, e.g., as a result of local
   credential element management operations outside GSS-API; once
   resolved, however, the value of such an explicit name will remain
   constant.

   The lifetime_rec result indicates the length of time for which the
   acquired credentials will be valid, as an offset from the present. A
   mechanism may return a reserved value indicating INDEFINITE if no
Top   ToC   RFC2743 - Page 34
   constraints on credential lifetime are imposed.  A caller of
   GSS_Acquire_cred() can request a length of time for which acquired
   credentials are to be valid (lifetime_req argument), beginning at the
   present, or can request credentials with a default validity interval.
   (Requests for postdated credentials are not supported within the
   GSS-API.) Certain mechanisms and implementations may bind in
   credential validity period specifiers at a point preliminary to
   invocation of the GSS_Acquire_cred() call (e.g., in conjunction with
   user login procedures). As a result, callers requesting non-default
   values for lifetime_req must recognize that such requests cannot
   always be honored and must be prepared to accommodate the use of
   returned credentials with different lifetimes as indicated in
   lifetime_rec.

   The caller of GSS_Acquire_cred() can explicitly specify a set of
   mech_types which are to be accommodated in the returned credentials
   (desired_mechs argument), or can request credentials for a system-
   defined default set of mech_types. Selection of the system-specified
   default set is recommended in the interests of application
   portability. The actual_mechs return value may be interrogated by the
   caller to determine the set of mechanisms with which the returned
   credentials may be used.

2.1.2: GSS_Release_cred call

Input: o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL -- is specified, the call will complete successfully, but -- will have no effect; no credential elements will be -- released. Outputs: o major_status INTEGER, o minor_status INTEGER Return major_status codes: o GSS_S_COMPLETE indicates that the credentials referenced by the input cred_handle were released for purposes of subsequent access by the caller. The effect on other processes which may be authorized shared access to such credentials is a local matter.
Top   ToC   RFC2743 - Page 35
   o  GSS_S_NO_CRED indicates that no release operation was performed,
   either because the input cred_handle was invalid or because the
   caller lacks authorization to access the referenced credentials.

   o  GSS_S_FAILURE indicates that the release operation failed for
   reasons unspecified at the GSS-API level.

   Provides a means for a caller to explicitly request that credentials
   be released when their use is no longer required. Note that system-
   specific credential management functions are also likely to exist,
   for example to assure that credentials shared among processes are
   properly deleted when all affected processes terminate, even if no
   explicit release requests are issued by those processes. Given the
   fact that multiple callers are not precluded from gaining authorized
   access to the same credentials, invocation of GSS_Release_cred()
   cannot be assumed to delete a particular set of credentials on a
   system-wide basis.

2.1.3: GSS_Inquire_cred call

Input: o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL -- is specified, default initiator credentials are queried Outputs: o major_status INTEGER, o minor_status INTEGER, o cred_name INTERNAL NAME, -- caller must release with -- GSS_Release_name() o lifetime_rec INTEGER -- in seconds, or reserved value for -- INDEFINITE o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, -- 2=ACCEPT-ONLY o mech_set SET OF OBJECT IDENTIFIER -- caller must release -- with GSS_Release_oid_set()
Top   ToC   RFC2743 - Page 36
   Return major_status codes:

   o  GSS_S_COMPLETE indicates that the credentials referenced by the
   input cred_handle argument were valid, and that the output cred_name,
   lifetime_rec, and cred_usage values represent, respectively, the
   credentials' associated principal name, remaining lifetime, suitable
   usage modes, and supported mechanism types.

   o  GSS_S_NO_CRED indicates that no information could be returned
   about the referenced credentials, either because the input
   cred_handle was invalid or because the caller lacks authorization to
   access the referenced credentials.

   o  GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced
   credentials are invalid.

   o  GSS_S_CREDENTIALS_EXPIRED indicates that the referenced
   credentials have expired.

   o  GSS_S_FAILURE indicates that the operation failed for reasons
   unspecified at the GSS-API level.

   The GSS_Inquire_cred() call is defined primarily for the use of those
   callers which request use of default credential behavior rather than
   acquiring credentials explicitly with GSS_Acquire_cred().  It enables
   callers to determine a credential structure's associated principal
   name, remaining validity period, usability for security context
   initiation and/or acceptance, and supported mechanisms.

   For a multi-mechanism credential, the returned "lifetime" specifier
   indicates the shortest lifetime of any of the mechanisms' elements in
   the credential (for either context initiation or acceptance
   purposes).

   GSS_Inquire_cred() should indicate INITIATE-AND-ACCEPT for
   "cred_usage" if both of the following conditions hold:

      (1) there exists in the credential an element which allows context
      initiation using some mechanism

      (2) there exists in the credential an element which allows context
      acceptance using some mechanism (allowably, but not necessarily,
      one of the same mechanism(s) qualifying for (1)).

   If condition (1) holds but not condition (2), GSS_Inquire_cred()
   should indicate INITIATE-ONLY for "cred_usage".  If condition (2)
   holds but not condition (1), GSS_Inquire_cred() should indicate
   ACCEPT-ONLY for "cred_usage".
Top   ToC   RFC2743 - Page 37
   Callers requiring finer disambiguation among available combinations
   of lifetimes, usage modes, and mechanisms should call the
   GSS_Inquire_cred_by_mech() routine, passing that routine one of the
   mech OIDs returned by GSS_Inquire_cred().

2.1.4: GSS_Add_cred call

Inputs: o input_cred_handle CREDENTIAL HANDLE -- handle to credential -- structure created with prior GSS_Acquire_cred() or -- GSS_Add_cred() call; see text for definition of behavior -- when GSS_C_NO_CREDENTIAL provided. o desired_name INTERNAL NAME o initiator_time_req INTEGER -- in seconds; 0 requests default o acceptor_time_req INTEGER -- in seconds; 0 requests default o desired_mech OBJECT IDENTIFIER o cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, -- 2=ACCEPT-ONLY Outputs: o major_status INTEGER, o minor_status INTEGER, o output_cred_handle CREDENTIAL HANDLE, -- NULL to request that -- credential elements be added "in place" to the credential -- structure identified by input_cred_handle, -- non-NULL pointer to request that -- a new credential structure and handle be created. -- if credential handle returned, caller must release with -- GSS_Release_cred() o actual_mechs SET OF OBJECT IDENTIFIER, -- if returned, caller must -- release with GSS_Release_oid_set() o initiator_time_rec INTEGER -- in seconds, or reserved value for -- INDEFINITE o acceptor_time_rec INTEGER -- in seconds, or reserved value for -- INDEFINITE
Top   ToC   RFC2743 - Page 38
   o  cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
   -- 2=ACCEPT-ONLY

   o  mech_set SET OF OBJECT IDENTIFIER -- full set of mechanisms
   -- supported by resulting credential.

   Return major_status codes:

   o  GSS_S_COMPLETE indicates that the credentials referenced by the
   input_cred_handle argument were valid, and that the resulting
   credential from GSS_Add_cred() is valid for the durations indicated
   in initiator_time_rec and acceptor_time_rec, suitable for the usage
   requested in cred_usage, and for the mechanisms indicated in
   actual_mechs.

   o  GSS_S_DUPLICATE_ELEMENT indicates that the input desired_mech
   specified a mechanism for which the referenced credential already
   contained a credential element with overlapping cred_usage and
   validity time specifiers.

   o  GSS_S_BAD_MECH indicates that the input desired_mech specified a
   mechanism unsupported by the GSS-API implementation, causing the
   GSS_Add_cred() operation to fail.

   o  GSS_S_BAD_NAMETYPE indicates that the provided desired_name is
   uninterpretable or of a type unsupported by the applicable underlying
   GSS-API mechanism(s), so the GSS_Add_cred() operation could not be
   performed for that name.

   o  GSS_S_BAD_NAME indicates that the provided desired_name is
   inconsistent in terms of internally-incorporated type specifier
   information, so the GSS_Add_cred() operation could not be performed
   for that name.

   o  GSS_S_NO_CRED indicates that the input_cred_handle referenced
   invalid or inaccessible credentials. In particular, this status
   should be returned upon temporary user-fixable conditions preventing
   successful credential establishment or upon lack of authorization to
   establish or use credentials representing the requested identity.

   o  GSS_S_CREDENTIALS_EXPIRED indicates that referenced credential
   elements have expired, so the GSS_Add_cred() operation could not be
   performed.

   o  GSS_S_FAILURE indicates that the operation failed for reasons
   unspecified at the GSS-API level.
Top   ToC   RFC2743 - Page 39
   GSS_Add_cred() enables callers to construct credentials iteratively
   by adding credential elements in successive operations, corresponding
   to different mechanisms.  This offers particular value in multi-
   mechanism environments, as the major_status and minor_status values
   returned on each iteration are individually visible and can therefore
   be interpreted unambiguously on a per-mechanism basis. A credential
   element is identified by the name of the principal to which it
   refers.  GSS-API implementations must impose a local access control
   policy on callers of this routine to prevent unauthorized callers
   from acquiring credential elements to which they are not entitled.
   This routine is not intended to provide a "login to the network"
   function, as such a function would involve the creation of new
   mechanism-specific authentication data, rather than merely acquiring
   a GSS-API handle to existing data.  Such functions, if required,
   should be defined in implementation-specific extension routines.

   If credential acquisition is time-consuming for a mechanism, the
   mechanism may choose to delay the actual acquisition until the
   credential is required (e.g. by GSS_Init_sec_context() or
   GSS_Accept_sec_context()).  Such mechanism-specific implementation
   decisions should be invisible to the calling application; thus a call
   of GSS_Inquire_cred() immediately following the call of
   GSS_Acquire_cred() must return valid credential data, and may
   therefore incur the overhead of a deferred credential acquisition.

   If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL
   output_cred_handle must be supplied.  For the case of
   GSS_C_NO_CREDENTIAL as input_cred_handle, GSS_Add_cred() will create
   the credential referenced by its output_cred_handle based on default
   behavior.  That is, the call will have the same effect as if the
   caller had previously called GSS_Acquire_cred(), specifying the same
   usage and passing GSS_C_NO_NAME as the desired_name parameter
   (thereby obtaining an explicit credential handle corresponding to
   default behavior), had passed that credential handle to
   GSS_Add_cred(), and had finally called GSS_Release_cred() on the
   credential handle received from GSS_Acquire_cred().

   This routine is expected to be used primarily by context acceptors,
   since implementations are likely to provide mechanism-specific ways
   of obtaining GSS-API initiator credentials from the system login
   process.  Some implementations may therefore not support the
   acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via
   GSS_Acquire_cred() for any name other than GSS_C_NO_NAME, or a name
   resulting from applying GSS_Inquire_context() to an active context,
   or a name resulting from applying GSS_Inquire_cred() against a
   credential handle corresponding to default behavior. It is important
   to recognize that the explicit name which is yielded by resolving a
   default reference may change over time, e.g., as a result of local
Top   ToC   RFC2743 - Page 40
   credential element management operations outside GSS-API; once
   resolved, however, the value of such an explicit name will remain
   constant.

   A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name,
   which will be interpreted as a request for a credential handle that
   will invoke default behavior when passed to GSS_Init_sec_context(),
   if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or
   GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or
   GSS_C_BOTH.

   The same input desired_name, or default reference, should be used on
   all GSS_Acquire_cred() and GSS_Add_cred() calls corresponding to a
   particular credential.

2.1.5: GSS_Inquire_cred_by_mech call

Inputs: o cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL -- specified, default initiator credentials are queried o mech_type OBJECT IDENTIFIER -- specific mechanism for -- which credentials are being queried Outputs: o major_status INTEGER, o minor_status INTEGER, o cred_name INTERNAL NAME, -- guaranteed to be MN; caller must -- release with GSS_Release_name() o lifetime_rec_initiate INTEGER -- in seconds, or reserved value for -- INDEFINITE o lifetime_rec_accept INTEGER -- in seconds, or reserved value for -- INDEFINITE o cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY, -- 2=ACCEPT-ONLY Return major_status codes: o GSS_S_COMPLETE indicates that the credentials referenced by the input cred_handle argument were valid, that the mechanism indicated by the input mech_type was represented with elements within those
Top   ToC   RFC2743 - Page 41
   credentials, and that the output cred_name, lifetime_rec_initiate,
   lifetime_rec_accept, and cred_usage values represent, respectively,
   the credentials' associated principal name, remaining lifetimes, and
   suitable usage modes.

   o  GSS_S_NO_CRED indicates that no information could be returned
   about the referenced credentials, either because the input
   cred_handle was invalid or because the caller lacks authorization to
   access the referenced credentials.

   o  GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced
   credentials are invalid.

   o  GSS_S_CREDENTIALS_EXPIRED indicates that the referenced
   credentials have expired.

   o  GSS_S_BAD_MECH indicates that the referenced credentials do not
   contain elements for the requested mechanism.

   o  GSS_S_FAILURE indicates that the operation failed for reasons
   unspecified at the GSS-API level.

   The GSS_Inquire_cred_by_mech() call enables callers in multi-
   mechanism environments to acquire specific data about available
   combinations of lifetimes, usage modes, and mechanisms within a
   credential structure.  The lifetime_rec_initiate result indicates the
   available lifetime for context initiation purposes; the
   lifetime_rec_accept result indicates the available lifetime for
   context acceptance purposes.

2.2: Context-level calls

This group of calls is devoted to the establishment and management of security contexts between peers. A context's initiator calls GSS_Init_sec_context(), resulting in generation of a token which the caller passes to the target. At the target, that token is passed to GSS_Accept_sec_context(). Depending on the underlying mech_type and specified options, additional token exchanges may be performed in the course of context establishment; such exchanges are accommodated by GSS_S_CONTINUE_NEEDED status returns from GSS_Init_sec_context() and GSS_Accept_sec_context(). Either party to an established context may invoke GSS_Delete_sec_context() to flush context information when a context is no longer required. GSS_Process_context_token() is used to process received tokens carrying context-level control information. GSS_Context_time() allows a caller to determine the length of time for which an established context will remain valid.
Top   ToC   RFC2743 - Page 42
   GSS_Inquire_context() returns status information describing context
   characteristics. GSS_Wrap_size_limit() allows a caller to determine
   the size of a token which will be generated by a GSS_Wrap()
   operation.  GSS_Export_sec_context() and GSS_Import_sec_context()
   enable transfer of active contexts between processes on an end
   system.

2.2.1: GSS_Init_sec_context call

Inputs: o claimant_cred_handle CREDENTIAL HANDLE, -- NULL specifies "use -- default" o input_context_handle CONTEXT HANDLE, -- 0 -- (GSS_C_NO_CONTEXT) specifies "none assigned yet" o targ_name INTERNAL NAME, o mech_type OBJECT IDENTIFIER, -- NULL parameter specifies "use -- default" o deleg_req_flag BOOLEAN, o mutual_req_flag BOOLEAN, o replay_det_req_flag BOOLEAN, o sequence_req_flag BOOLEAN, o anon_req_flag BOOLEAN, o conf_req_flag BOOLEAN, o integ_req_flag BOOLEAN, o lifetime_req INTEGER, -- 0 specifies default lifetime o chan_bindings OCTET STRING, o input_token OCTET STRING -- NULL or token received from target Outputs: o major_status INTEGER, o minor_status INTEGER,
Top   ToC   RFC2743 - Page 43
   o  output_context_handle CONTEXT HANDLE,  -- once returned non-NULL,
   -- caller must release with GSS_Delete_sec_context()

   o  mech_type OBJECT IDENTIFIER, -- actual mechanism always
   -- indicated, never NULL; caller should treat as read-only
   -- and should not attempt to release

   o  output_token OCTET STRING, -- NULL or token to pass to context
   -- target; caller must release with GSS_Release_buffer()

   o  deleg_state BOOLEAN,

   o  mutual_state BOOLEAN,

   o  replay_det_state BOOLEAN,

   o  sequence_state BOOLEAN,

   o  anon_state BOOLEAN,

   o  trans_state BOOLEAN,

   o  prot_ready_state BOOLEAN, -- see Section 1.2.7

   o  conf_avail BOOLEAN,

   o  integ_avail BOOLEAN,

   o  lifetime_rec INTEGER -- in seconds, or reserved value for
   -- INDEFINITE

   This call may block pending network interactions for those mech_types
   in which an authentication server or other network entity must be
   consulted on behalf of a context initiator in order to generate an
   output_token suitable for presentation to a specified target.

   Return major_status codes:

   o  GSS_S_COMPLETE indicates that context-level information was
   successfully initialized, and that the returned output_token will
   provide sufficient information for the target to perform per-message
   processing on the newly-established context.

   o  GSS_S_CONTINUE_NEEDED indicates that control information in the
   returned output_token must be sent to the target, and that a reply
   must be received and passed as the input_token argument
Top   ToC   RFC2743 - Page 44
   to a continuation call to GSS_Init_sec_context(), before per-message
   processing can be performed in conjunction with this context (unless
   the prot_ready_state value is concurrently returned TRUE).

   o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed
   on the input_token failed, preventing further processing from being
   performed based on that token.

   o  GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks
   performed on the credential structure referenced by
   claimant_cred_handle failed, preventing further processing from being
   performed using that credential structure.

   o  GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received
   input_token contains an incorrect integrity check, so context setup
   cannot be accomplished.

   o  GSS_S_NO_CRED indicates that no context was established, either
   because the input cred_handle was invalid, because the referenced
   credentials are valid for context acceptor use only, because the
   caller lacks authorization to access the referenced credentials, or
   because the resolution of default credentials failed.

   o  GSS_S_CREDENTIALS_EXPIRED indicates that the credentials provided
   through the input claimant_cred_handle argument are no longer valid,
   so context establishment cannot be completed.

   o  GSS_S_BAD_BINDINGS indicates that a mismatch between the caller-
   provided chan_bindings and those extracted from the input_token was
   detected, signifying a security-relevant event and preventing context
   establishment. (This result will be returned by
   GSS_Init_sec_context() only for contexts where mutual_state is TRUE.)

   o  GSS_S_OLD_TOKEN indicates that the input_token is too old to be
   checked for integrity. This is a fatal error during context
   establishment.

   o  GSS_S_DUPLICATE_TOKEN indicates that the input token has a correct
   integrity check, but is a duplicate of a token already processed.
   This is a fatal error during context establishment.

   o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
   for the input context_handle provided; this major status will be
   returned only for successor calls following GSS_S_CONTINUE_ NEEDED
   status returns.
Top   ToC   RFC2743 - Page 45
   o  GSS_S_BAD_NAMETYPE indicates that the provided targ_name is of a
   type uninterpretable or unsupported by the applicable underlying
   GSS-API mechanism(s), so context establishment cannot be completed.

   o  GSS_S_BAD_NAME indicates that the provided targ_name is
   inconsistent in terms of internally-incorporated type specifier
   information, so context establishment cannot be accomplished.

   o  GSS_S_BAD_MECH indicates receipt of a context establishment token
   or of a caller request specifying a mechanism unsupported by the
   local system or with the caller's active credentials

   o  GSS_S_FAILURE indicates that context setup could not be
   accomplished for reasons unspecified at the GSS-API level, and that
   no interface-defined recovery action is available.

   This routine is used by a context initiator, and ordinarily emits an
   output_token suitable for use by the target within the selected
   mech_type's protocol.  For the case of a multi-step exchange, this
   output_token will be one in a series, each generated by a successive
   call. Using information in the credentials structure referenced by
   claimant_cred_handle, GSS_Init_sec_context() initializes the data
   structures required to establish a security context with target
   targ_name.

   The targ_name may be any valid INTERNAL NAME; it need not be an MN.
   In addition to support for other name types, it is recommended (newly
   as of GSS-V2, Update 1) that mechanisms be able to accept
   GSS_C_NO_NAME as an input type for targ_name.  While recommended,
   such support is not required, and it is recognized that not all
   mechanisms can construct tokens without explicitly naming the context
   target, even when mutual authentication of the target is not
   obtained.  Callers wishing to make use of this facility and concerned
   with portability should be aware that support for GSS_C_NO_NAME as
   input targ_name type is unlikely to be provided within mechanism
   definitions specified prior to GSS-V2, Update 1.

   The claimant_cred_handle must correspond to the same valid
   credentials structure on the initial call to GSS_Init_sec_context()
   and on any successor calls resulting from GSS_S_CONTINUE_NEEDED
   status returns; different protocol sequences modeled by the
   GSS_S_CONTINUE_NEEDED facility will require access to credentials at
   different points in the context establishment sequence.

   The caller-provided input_context_handle argument is to be 0
   (GSS_C_NO_CONTEXT), specifying "not yet assigned", on the first
   GSS_Init_sec_context()  call relating to a given context. If
   successful (i.e., if accompanied by major_status GSS_S_COMPLETE or
Top   ToC   RFC2743 - Page 46
   GSS_S_CONTINUE_NEEDED), and only if successful, the initial
   GSS_Init_sec_context() call returns a non-zero output_context_handle
   for use in future references to this context.  Once a non-zero
   output_context_handle has been returned, GSS-API callers should call
   GSS_Delete_sec_context() to release context-related resources if
   errors occur in later phases of context establishment, or when an
   established context is no longer required. If GSS_Init_sec_context()
   is passed the handle of a context which is already fully established,
   GSS_S_FAILURE status is returned.

   When continuation attempts to GSS_Init_sec_context() are needed to
   perform context establishment, the previously-returned non-zero
   handle value is entered into the input_context_handle argument and
   will be echoed in the returned output_context_handle argument. On
   such continuation attempts (and only on continuation attempts) the
   input_token value is used, to provide the token returned from the
   context's target.

   The chan_bindings argument is used by the caller to provide
   information binding the security context to security-related
   characteristics (e.g., addresses, cryptographic keys) of the
   underlying communications channel. See Section 1.1.6 of this document
   for more discussion of this argument's usage.

   The input_token argument contains a message received from the target,
   and is significant only on a call to GSS_Init_sec_context() which
   follows a previous return indicating GSS_S_CONTINUE_NEEDED
   major_status.

   It is the caller's responsibility to establish a communications path
   to the target, and to transmit any returned output_token (independent
   of the accompanying returned major_status value) to the target over
   that path. The output_token can, however, be transmitted along with
   the first application-provided input message to be processed by
   GSS_GetMIC() or GSS_Wrap() in conjunction with a successfully-
   established context. (Note: when the GSS-V2 prot_ready_state
   indicator is returned TRUE, it can be possible to transfer a
   protected message before context establishment is complete:  see also
   Section 1.2.7)

   The initiator may request various context-level functions through
   input flags: the deleg_req_flag requests delegation of access rights,
   the mutual_req_flag requests mutual authentication, the
   replay_det_req_flag requests that replay detection features be
   applied to messages transferred on the established context, and the
   sequence_req_flag requests that sequencing be enforced. (See Section
Top   ToC   RFC2743 - Page 47
   1.2.3 for more information on replay detection and sequencing
   features.)  The anon_req_flag requests that the initiator's identity
   not be transferred within tokens to be sent to the acceptor.

   The conf_req_flag and integ_req_flag provide informatory inputs to
   the GSS-API implementation as to whether, respectively, per-message
   confidentiality and per-message integrity services will be required
   on the context.  This information is important as an input to
   negotiating mechanisms.  It is important to recognize, however, that
   the inclusion of these flags (which are newly defined for GSS-V2)
   introduces a backward incompatibility with callers implemented to
   GSS-V1, where the flags were not defined.  Since no GSS-V1 callers
   would set these flags, even if per-message services are desired,
   GSS-V2 mechanism implementations which enable such services
   selectively based on the flags' values may fail to provide them to
   contexts established for GSS-V1 callers.  It may be appropriate under
   certain circumstances, therefore, for such mechanism implementations
   to infer these service request flags to be set if a caller is known
   to be implemented to GSS-V1.

   Not all of the optionally-requestable features will be available in
   all underlying mech_types. The corresponding return state values
   deleg_state, mutual_state, replay_det_state, and sequence_state
   indicate, as a function of mech_type processing capabilities and
   initiator-provided input flags, the set of features which will be
   active on the context.  The returned trans_state value indicates
   whether the context is transferable to other processes through use of
   GSS_Export_sec_context().  These state indicators' values are
   undefined unless either the routine's major_status indicates
   GSS_S_COMPLETE, or TRUE prot_ready_state is returned along with
   GSS_S_CONTINUE_NEEDED major_status; for the latter case, it is
   possible that additional features, not confirmed or indicated along
   with TRUE prot_ready_state, will be confirmed and indicated when
   GSS_S_COMPLETE is subsequently returned.

   The returned anon_state and prot_ready_state values are significant
   for both GSS_S_COMPLETE and GSS_S_CONTINUE_NEEDED major_status
   returns from GSS_Init_sec_context(). When anon_state is returned
   TRUE, this indicates that neither the current token nor its
   predecessors delivers or has delivered the initiator's identity.
   Callers wishing to perform context establishment only if anonymity
   support is provided should transfer a returned token from
   GSS_Init_sec_context() to the peer only if it is accompanied by a
   TRUE anon_state indicator.  When prot_ready_state is returned TRUE in
   conjunction with GSS_S_CONTINUE_NEEDED major_status, this indicates
   that per-message protection operations may be applied on the context:
   see Section 1.2.7 for further discussion of this facility.
Top   ToC   RFC2743 - Page 48
   Failure to provide the precise set of features requested by the
   caller does not cause context establishment to fail; it is the
   caller's prerogative to delete the context if the feature set
   provided is unsuitable for the caller's use.

   The returned mech_type value indicates the specific mechanism
   employed on the context; it will never indicate the value for
   "default".  A valid mech_type result must be returned along with a
   GSS_S_COMPLETE status return; GSS-API implementations may (but are
   not required to) also return mech_type along with predecessor calls
   indicating GSS_S_CONTINUE_NEEDED status or (if a mechanism is
   determinable) in conjunction with fatal error cases.  For the case of
   mechanisms which themselves perform negotiation, the returned
   mech_type result may indicate selection of a mechanism identified by
   an OID different than that passed in the input mech_type argument,
   and the returned value may change between successive calls returning
   GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE.

   The conf_avail return value indicates whether the context supports
   per-message confidentiality services, and so informs the caller
   whether or not a request for encryption through the conf_req_flag
   input to GSS_Wrap() can be honored. In similar fashion, the
   integ_avail return value indicates whether per-message integrity
   services are available (through either GSS_GetMIC() or GSS_Wrap()) on
   the established context. These state indicators' values are undefined
   unless either the routine's major_status indicates GSS_S_COMPLETE, or
   TRUE prot_ready_state is returned along with GSS_S_CONTINUE_NEEDED
   major_status.

   The lifetime_req input specifies a desired upper bound for the
   lifetime of the context to be established, with a value of 0 used to
   request a default lifetime. The lifetime_rec return value indicates
   the length of time for which the context will be valid, expressed as
   an offset from the present; depending on mechanism capabilities,
   credential lifetimes, and local policy, it may not correspond to the
   value requested in lifetime_req.  If no constraints on context
   lifetime are imposed, this may be indicated by returning a reserved
   value representing INDEFINITE lifetime_req. The value of lifetime_rec
   is undefined unless the routine's major_status indicates
   GSS_S_COMPLETE.

   If the mutual_state is TRUE, this fact will be reflected within the
   output_token. A call to GSS_Accept_sec_context() at the target in
   conjunction with such a context will return a token, to be processed
   by a continuation call to GSS_Init_sec_context(), in order to achieve
   mutual authentication.
Top   ToC   RFC2743 - Page 49

2.2.2: GSS_Accept_sec_context call

Inputs: o acceptor_cred_handle CREDENTIAL HANDLE, -- NULL specifies -- "use default" o input_context_handle CONTEXT HANDLE, -- 0 -- (GSS_C_NO_CONTEXT) specifies "not yet assigned" o chan_bindings OCTET STRING, o input_token OCTET STRING Outputs: o major_status INTEGER, o minor_status INTEGER, o src_name INTERNAL NAME, -- guaranteed to be MN -- once returned, caller must release with GSS_Release_name() o mech_type OBJECT IDENTIFIER, -- caller should treat as -- read-only; does not need to be released o output_context_handle CONTEXT HANDLE, -- once returned -- non-NULL in context establishment sequence, caller -- must release with GSS_Delete_sec_context() o deleg_state BOOLEAN, o mutual_state BOOLEAN, o replay_det_state BOOLEAN, o sequence_state BOOLEAN, o anon_state BOOLEAN, o trans_state BOOLEAN, o prot_ready_state BOOLEAN, -- see Section 1.2.7 for discussion o conf_avail BOOLEAN, o integ_avail BOOLEAN,
Top   ToC   RFC2743 - Page 50
   o  lifetime_rec INTEGER, -- in seconds, or reserved value for
   -- INDEFINITE

   o  delegated_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL,
   -- caller must release with GSS_Release_cred()

   o  output_token OCTET STRING -- NULL or token to pass to context
   -- initiator; if returned non-NULL, caller must release with
   -- GSS_Release_buffer()

   This call may block pending network interactions for those mech_types
   in which a directory service or other network entity must be
   consulted on behalf of a context acceptor in order to validate a
   received input_token.

   Return major_status codes:

   o  GSS_S_COMPLETE indicates that context-level data structures were
   successfully initialized, and that per-message processing can now be
   performed in conjunction with this context.

   o  GSS_S_CONTINUE_NEEDED indicates that control information in the
   returned output_token must be sent to the initiator, and that a
   response must be received and passed as the input_token argument to a
   continuation call to GSS_Accept_sec_context(), before per-message
   processing can be performed in conjunction with this context.

   o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed
   on the input_token failed, preventing further processing from being
   performed based on that token.

   o  GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks
   performed on the credential structure referenced by
   acceptor_cred_handle failed, preventing further processing from being
   performed using that credential structure.

   o  GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received
   input_token contains an incorrect integrity check, so context setup
   cannot be accomplished.

   o  GSS_S_DUPLICATE_TOKEN indicates that the integrity check on the
   received input_token was correct, but that the input_token was
   recognized as a duplicate of an input_token already processed. No new
   context is established.
Top   ToC   RFC2743 - Page 51
   o  GSS_S_OLD_TOKEN indicates that the integrity check on the received
   input_token was correct, but that the input_token is too old to be
   checked for duplication against previously-processed input_tokens. No
   new context is established.

   o  GSS_S_NO_CRED indicates that no context was established, either
   because the input cred_handle was invalid, because the referenced
   credentials are valid for context initiator use only, because the
   caller lacks authorization to access the referenced credentials, or
   because the procedure for default credential resolution failed.

   o  GSS_S_CREDENTIALS_EXPIRED indicates that the credentials provided
   through the input acceptor_cred_handle argument are no longer valid,
   so context establishment cannot be completed.

   o  GSS_S_BAD_BINDINGS indicates that a mismatch between the caller-
   provided chan_bindings and those extracted from the input_token was
   detected, signifying a security-relevant event and preventing context
   establishment.

   o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
   for the input context_handle provided; this major status will be
   returned only for successor calls following GSS_S_CONTINUE_ NEEDED
   status returns.

   o  GSS_S_BAD_MECH indicates receipt of a context establishment token
   specifying a mechanism unsupported by the local system or with the
   caller's active credentials.

   o  GSS_S_FAILURE indicates that context setup could not be
   accomplished for reasons unspecified at the GSS-API level, and that
   no interface-defined recovery action is available.

   The GSS_Accept_sec_context() routine is used by a context target.
   Using information in the credentials structure referenced by the
   input acceptor_cred_handle, it verifies the incoming input_token and
   (following the successful completion of a context establishment
   sequence) returns the authenticated src_name and the mech_type used.
   The returned src_name is guaranteed to be an MN, processed by the
   mechanism under which the context was established. The
   acceptor_cred_handle must correspond to the same valid credentials
   structure on the initial call to GSS_Accept_sec_context() and on any
   successor calls resulting from GSS_S_CONTINUE_NEEDED status returns;
   different protocol sequences modeled by the GSS_S_CONTINUE_NEEDED
   mechanism will require access to credentials at different points in
   the context establishment sequence.
Top   ToC   RFC2743 - Page 52
   The caller-provided input_context_handle argument is to be 0
   (GSS_C_NO_CONTEXT), specifying "not yet assigned", on the first
   GSS_Accept_sec_context() call relating to a given context. If
   successful (i.e., if accompanied by major_status GSS_S_COMPLETE or
   GSS_S_CONTINUE_NEEDED), and only if successful, the initial
   GSS_Accept_sec_context() call returns a non-zero
   output_context_handle for use in future references to this context.
   Once a non-zero output_context_handle has been returned, GSS-API
   callers should call GSS_Delete_sec_context() to release context-
   related resources if errors occur in later phases of context
   establishment, or when an established context is no longer required.
   If GSS_Accept_sec_context() is passed the handle of a context which
   is already fully established, GSS_S_FAILURE status is returned.

   The chan_bindings argument is used by the caller to provide
   information binding the security context to security-related
   characteristics (e.g., addresses, cryptographic keys) of the
   underlying communications channel. See Section 1.1.6 of this document
   for more discussion of this argument's usage.

   The returned state results (deleg_state, mutual_state,
   replay_det_state, sequence_state, anon_state, trans_state, and
   prot_ready_state) reflect the same information as described for
   GSS_Init_sec_context(), and their values are significant under the
   same return state conditions.

   The conf_avail return value indicates whether the context supports
   per-message confidentiality services, and so informs the caller
   whether or not a request for encryption through the conf_req_flag
   input to GSS_Wrap() can be honored. In similar fashion, the
   integ_avail return value indicates whether per-message integrity
   services are available (through either GSS_GetMIC()  or GSS_Wrap())
   on the established context.  These values are significant under the
   same return state conditions as described under
   GSS_Init_sec_context().

   The lifetime_rec return value is significant only in conjunction with
   GSS_S_COMPLETE major_status, and indicates the length of time for
   which the context will be valid, expressed as an offset from the
   present.

   The returned mech_type value indicates the specific mechanism
   employed on the context; it will never indicate the value for
   "default".  A valid mech_type result must be returned whenever
   GSS_S_COMPLETE status is indicated; GSS-API implementations may (but
   are not required to) also return mech_type along with predecessor
   calls indicating GSS_S_CONTINUE_NEEDED status or (if a mechanism is
   determinable) in conjunction with fatal error cases.  For the case of
Top   ToC   RFC2743 - Page 53
   mechanisms which themselves perform negotiation, the returned
   mech_type result may indicate selection of a mechanism identified by
   an OID different than that passed in the input mech_type argument,
   and the returned value may change between successive calls returning
   GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE.

   The delegated_cred_handle result is significant only when deleg_state
   is TRUE, and provides a means for the target to reference the
   delegated credentials. The output_token result, when non-NULL,
   provides a context-level token to be returned to the context
   initiator to continue a multi-step context establishment sequence. As
   noted with GSS_Init_sec_context(), any returned token should be
   transferred to the context's peer (in this case, the context
   initiator), independent of the value of the accompanying returned
   major_status.

   Note: A target must be able to distinguish a context-level
   input_token, which is passed to GSS_Accept_sec_context(), from the
   per-message data elements passed to GSS_VerifyMIC()  or GSS_Unwrap().
   These data elements may arrive in a single application message, and
   GSS_Accept_sec_context() must be performed before per-message
   processing can be performed successfully.

2.2.3: GSS_Delete_sec_context call

Input: o context_handle CONTEXT HANDLE Outputs: o major_status INTEGER, o minor_status INTEGER, o output_context_token OCTET STRING Return major_status codes: o GSS_S_COMPLETE indicates that the context was recognized, and that relevant context-specific information was flushed. If the caller provides a non-null buffer to receive an output_context_token, and the mechanism returns a non-NULL token into that buffer, the returned output_context_token is ready for transfer to the context's peer. o GSS_S_NO_CONTEXT indicates that no valid context was recognized for the input context_handle provided, so no deletion was performed.
Top   ToC   RFC2743 - Page 54
   o  GSS_S_FAILURE indicates that the context is recognized, but that
   the GSS_Delete_sec_context() operation could not be performed for
   reasons unspecified at the GSS-API level.

   This call can be made by either peer in a security context, to flush
   context-specific information. Once a non-zero output_context_handle
   has been returned by context establishment calls, GSS-API callers
   should call GSS_Delete_sec_context() to release context-related
   resources if errors occur in later phases of context establishment,
   or when an established context is no longer required.  This call may
   block pending network interactions for mech_types in which active
   notification must be made to a central server when a security context
   is to be deleted.

   If a non-null output_context_token parameter is provided by the
   caller, an output_context_token may be returned to the caller.  If an
   output_context_token is provided to the caller, it can be passed to
   the context's peer to inform the peer's GSS-API implementation that
   the peer's corresponding context information can also be flushed.
   (Once a context is established, the peers involved are expected to
   retain cached credential and context-related information until the
   information's expiration time is reached or until a
   GSS_Delete_sec_context() call is made.)

   The facility for context_token usage to signal context deletion is
   retained for compatibility with GSS-API Version 1.  For current
   usage, it is recommended that both peers to a context invoke
   GSS_Delete_sec_context() independently, passing a null
   output_context_token buffer to indicate that no context_token is
   required.  Implementations of GSS_Delete_sec_context() should delete
   relevant locally-stored context information.

   Attempts to perform per-message processing on a deleted context will
   result in error returns.

2.2.4: GSS_Process_context_token call

Inputs: o context_handle CONTEXT HANDLE, o input_context_token OCTET STRING Outputs: o major_status INTEGER, o minor_status INTEGER,
Top   ToC   RFC2743 - Page 55
   Return major_status codes:

   o  GSS_S_COMPLETE indicates that the input_context_token was
   successfully processed in conjunction with the context referenced by
   context_handle.

   o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed
   on the received context_token failed, preventing further processing
   from being performed with that token.

   o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
   for the input context_handle provided.

   o  GSS_S_FAILURE indicates that the context is recognized, but that
   the GSS_Process_context_token() operation could not be performed for
   reasons unspecified at the GSS-API level.

   This call is used to process context_tokens received from a peer once
   a context has been established, with corresponding impact on
   context-level state information. One use for this facility is
   processing of the context_tokens generated by
   GSS_Delete_sec_context(); GSS_Process_context_token() will not block
   pending network interactions for that purpose. Another use is to
   process tokens indicating remote-peer context establishment failures
   after the point where the local GSS-API implementation has already
   indicated GSS_S_COMPLETE status.

2.2.5: GSS_Context_time call

Input: o context_handle CONTEXT HANDLE, Outputs: o major_status INTEGER, o minor_status INTEGER, o lifetime_rec INTEGER -- in seconds, or reserved value for -- INDEFINITE Return major_status codes: o GSS_S_COMPLETE indicates that the referenced context is valid, and will remain valid for the amount of time indicated in lifetime_rec.
Top   ToC   RFC2743 - Page 56
   o  GSS_S_CONTEXT_EXPIRED indicates that data items related to the
   referenced context have expired.

   o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
   for the input context_handle provided.

   o  GSS_S_FAILURE indicates that the requested operation failed for
   reasons unspecified at the GSS-API level.

   This call is used to determine the amount of time for which a
   currently established context will remain valid.

2.2.6: GSS_Inquire_context call

Input: o context_handle CONTEXT HANDLE, Outputs: o major_status INTEGER, o minor_status INTEGER, o src_name INTERNAL NAME, -- name of context initiator, -- guaranteed to be MN; -- caller must release with GSS_Release_name() if returned o targ_name INTERNAL NAME, -- name of context target, -- guaranteed to be MN; -- caller must release with GSS_Release_name() if returned o lifetime_rec INTEGER -- in seconds, or reserved value for -- INDEFINITE or EXPIRED o mech_type OBJECT IDENTIFIER, -- the mechanism supporting this -- security context; caller should treat as read-only and not -- attempt to release o deleg_state BOOLEAN, o mutual_state BOOLEAN, o replay_det_state BOOLEAN, o sequence_state BOOLEAN, o anon_state BOOLEAN,
Top   ToC   RFC2743 - Page 57
   o  trans_state BOOLEAN,

   o  prot_ready_state BOOLEAN,

   o  conf_avail BOOLEAN,

   o  integ_avail BOOLEAN,

   o  locally_initiated BOOLEAN, -- TRUE if initiator, FALSE if acceptor

   o  open BOOLEAN, -- TRUE if context fully established, FALSE
   -- if partly established (in CONTINUE_NEEDED state)

   Return major_status codes:

   o  GSS_S_COMPLETE indicates that the referenced context is valid and
   that deleg_state, mutual_state, replay_det_state, sequence_state,
   anon_state, trans_state, prot_ready_state, conf_avail, integ_avail,
   locally_initiated, and open return values describe the corresponding
   characteristics of the context.  If open is TRUE, lifetime_rec is
   also returned: if open is TRUE and the context peer's name is known,
   src_name and targ_name are valid in addition to the values listed
   above.  The mech_type value must be returned for contexts where open
   is TRUE and may be returned for contexts where open is FALSE.

   o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
   for the input context_handle provided. Return values other than
   major_status and minor_status are undefined.

   o  GSS_S_FAILURE indicates that the requested operation failed for
   reasons unspecified at the GSS-API level. Return values other than
   major_status and minor_status are undefined.

   This call is used to extract information describing characteristics
   of a security context.  Note that GSS-API implementations are
   expected to retain inquirable context data on a context until the
   context is released by a caller, even after the context has expired,
   although underlying cryptographic data elements may be deleted after
   expiration in order to limit their exposure.

2.2.7: GSS_Wrap_size_limit call

Inputs: o context_handle CONTEXT HANDLE, o conf_req_flag BOOLEAN,
Top   ToC   RFC2743 - Page 58
   o  qop INTEGER,

   o  output_size INTEGER

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  max_input_size INTEGER

   Return major_status codes:

   o  GSS_S_COMPLETE indicates a successful token size determination:
   an input message with a length in octets equal to the returned
   max_input_size value will, when passed to GSS_Wrap() for processing
   on the context identified by the context_handle parameter with the
   confidentiality request state as provided in conf_req_flag and with
   the quality of protection specifier provided in the qop parameter,
   yield an output token no larger than the value of the provided
   output_size parameter.

   o  GSS_S_CONTEXT_EXPIRED indicates that the provided input
   context_handle is recognized, but that the referenced context has
   expired.  Return values other than major_status and minor_status are
   undefined.

   o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
   for the input context_handle provided. Return values other than
   major_status and minor_status are undefined.

   o  GSS_S_BAD_QOP indicates that the provided QOP value is not
   recognized or supported for the context.

   o  GSS_S_FAILURE indicates that the requested operation failed for
   reasons unspecified at the GSS-API level. Return values other than
   major_status and minor_status are undefined.

   This call is used to determine the largest input datum which may be
   passed to GSS_Wrap() without yielding an output token larger than a
   caller-specified value.
Top   ToC   RFC2743 - Page 59

2.2.8: GSS_Export_sec_context call

Inputs: o context_handle CONTEXT HANDLE Outputs: o major_status INTEGER, o minor_status INTEGER, o interprocess_token OCTET STRING -- caller must release -- with GSS_Release_buffer() Return major_status codes: o GSS_S_COMPLETE indicates that the referenced context has been successfully exported to a representation in the interprocess_token, and is no longer available for use by the caller. o GSS_S_UNAVAILABLE indicates that the context export facility is not available for use on the referenced context. (This status should occur only for contexts for which the trans_state value is FALSE.) Return values other than major_status and minor_status are undefined. o GSS_S_CONTEXT_EXPIRED indicates that the provided input context_handle is recognized, but that the referenced context has expired. Return values other than major_status and minor_status are undefined. o GSS_S_NO_CONTEXT indicates that no valid context was recognized for the input context_handle provided. Return values other than major_status and minor_status are undefined. o GSS_S_FAILURE indicates that the requested operation failed for reasons unspecified at the GSS-API level. Return values other than major_status and minor_status are undefined. This call generates an interprocess token for transfer to another process within an end system, in order to transfer control of a security context to that process. The recipient of the interprocess token will call GSS_Import_sec_context() to accept the transfer. The GSS_Export_sec_context() operation is defined for use only with security contexts which are fully and successfully established (i.e., those for which GSS_Init_sec_context() and GSS_Accept_sec_context() have returned GSS_S_COMPLETE major_status).
Top   ToC   RFC2743 - Page 60
   A successful GSS_Export_sec_context() operation deactivates the
   security context for the calling process; for this case, the GSS-API
   implementation shall deallocate all process-wide resources associated
   with the security context and shall set the context_handle to
   GSS_C_NO_CONTEXT.  In the event of an error that makes it impossible
   to complete export of the security context, the GSS-API
   implementation must not return an interprocess token and should
   strive to leave the security context referenced by the context_handle
   untouched.  If this is impossible, it is permissible for the
   implementation to delete the security context, provided that it also
   sets the context_handle parameter to GSS_C_NO_CONTEXT.

   Portable callers must not assume that a given interprocess token can
   be imported by GSS_Import_sec_context() more than once, thereby
   creating multiple instantiations of a single context.  GSS-API
   implementations may detect and reject attempted multiple imports, but
   are not required to do so.

   The internal representation contained within the interprocess token
   is an implementation-defined local matter.  Interprocess tokens
   cannot be assumed to be transferable across different GSS-API
   implementations.

   It is recommended that GSS-API implementations adopt policies suited
   to their operational environments in order to define the set of
   processes eligible to import a context, but specific constraints in
   this area are local matters.  Candidate examples include transfers
   between processes operating on behalf of the same user identity, or
   processes comprising a common job.  However, it may be impossible to
   enforce such policies in some implementations.

   In support of the above goals, implementations may protect the
   transferred context data by using cryptography to protect data within
   the interprocess token, or by using interprocess tokens as a means to
   reference local interprocess communication facilities (protected by
   other means) rather than storing the context data directly within the
   tokens.

   Transfer of an open context may, for certain mechanisms and
   implementations, reveal data about the credential which was used to
   establish the context.  Callers should, therefore, be cautious about
   the trustworthiness of processes to which they transfer contexts.
   Although the GSS-API implementation may provide its own set of
   protections over the exported context, the caller is responsible for
   protecting the interprocess token from disclosure, and for taking
   care that the context is transferred to an appropriate destination
   process.
Top   ToC   RFC2743 - Page 61

2.2.9: GSS_Import_sec_context call

Inputs: o interprocess_token OCTET STRING Outputs: o major_status INTEGER, o minor_status INTEGER, o context_handle CONTEXT HANDLE -- if successfully returned, -- caller must release with GSS_Delete_sec_context() Return major_status codes: o GSS_S_COMPLETE indicates that the context represented by the input interprocess_token has been successfully transferred to the caller, and is available for future use via the output context_handle. o GSS_S_NO_CONTEXT indicates that the context represented by the input interprocess_token was invalid. Return values other than major_status and minor_status are undefined. o GSS_S_DEFECTIVE_TOKEN indicates that the input interprocess_token was defective. Return values other than major_status and minor_status are undefined. o GSS_S_UNAVAILABLE indicates that the context import facility is not available for use on the referenced context. Return values other than major_status and minor_status are undefined. o GSS_S_UNAUTHORIZED indicates that the context represented by the input interprocess_token is unauthorized for transfer to the caller. Return values other than major_status and minor_status are undefined. o GSS_S_FAILURE indicates that the requested operation failed for reasons unspecified at the GSS-API level. Return values other than major_status and minor_status are undefined. This call processes an interprocess token generated by GSS_Export_sec_context(), making the transferred context available for use by the caller. After a successful GSS_Import_sec_context() operation, the imported context is available for use by the importing process. In particular, the imported context is usable for all per- message operations and may be deleted or exported by its importer. The inability to receive delegated credentials through
Top   ToC   RFC2743 - Page 62
   gss_import_sec_context() precludes establishment of new contexts
   based on information delegated to the importer's end system within
   the context which is being imported, unless those delegated
   credentials are obtained through separate routines (e.g., XGSS-API
   calls) outside the GSS-V2 definition.

   For further discussion of the security and authorization issues
   regarding this call, please see the discussion in Section 2.2.8.



(page 62 continued on part 3)

Next Section