home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_a_c / draft-ietf-cat-rfc2078bis-00.txt < prev    next >
Text File  |  1997-09-23  |  205KB  |  5,576 lines

  1.  
  2. Internet-Draft                                                   J. Linn
  3. IETF Common Authentication Technology WG                          CAT WG
  4. <draft-ietf-cat-rfc2078bis-00.txt>                     23 September 1997
  5.  
  6.    Generic Security Service Application Program Interface, Version 2
  7.  
  8. STATUS OF THIS MEMO
  9.  
  10.    This document is an Internet-Draft.  Internet-Drafts are working
  11.    documents of the Internet Engineering Task Force (IETF), its areas,
  12.    and its working groups.  Note that other groups may also distribute
  13.    working documents as Internet-Drafts.
  14.  
  15.    Internet-Drafts are draft documents valid for a maximum of six months
  16.    and may be updated, replaced, or obsoleted by other documents at any
  17.    time.  It is inappropriate to use Internet- Drafts as reference
  18.    material or to cite them other than as ``work in progress.''
  19.  
  20.    To learn the current status of any Internet-Draft, please check the
  21.    ``1id-abstracts.txt'' listing contained in the Internet- Drafts
  22.    Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net
  23.    (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
  24.    Rim).
  25.  
  26.    Comments on this document should be sent to "cat-ietf@mit.edu", the
  27.    IETF Common Authentication Technology WG discussion list.
  28.  
  29. ABSTRACT
  30.  
  31.    The Generic Security Service Application Program Interface (GSS-API),
  32.    Version 2, as defined in RFC-2078, provides security services to
  33.    callers in a generic fashion, supportable with a range of underlying
  34.    mechanisms and technologies and hence allowing source-level
  35.    portability of applications to different environments. This
  36.    specification defines GSS-API services and primitives at a level
  37.    independent of underlying mechanism and programming language
  38.    environment, and is to be complemented by other, related
  39.    specifications:
  40.  
  41.       documents defining specific parameter bindings for particular
  42.       language environments
  43.  
  44.       documents defining token formats, protocols, and procedures to be
  45.       implemented in order to realize GSS-API services atop particular
  46.       security mechanisms
  47.  
  48.    This Internet-Draft revises RFC-2078, making specific, incremental
  49.    changes in response to implementation experience and liaison
  50.  
  51.  
  52.  
  53. Linn                Document Expiration: 23 March 1998          [Page 1]
  54.  
  55.  
  56.  
  57.  
  58.  
  59. Internet-Draft                                         23 September 1997
  60.  
  61.  
  62.    requests. It is intended, therefore, that this draft or a successor
  63.    version thereto will become the basis for subsequent progression of
  64.    the GSS-API specification on the standards track.
  65.  
  66. 1: GSS-API Characteristics and Concepts
  67.  
  68.    GSS-API operates in the following paradigm.  A typical GSS-API caller
  69.    is itself a communications protocol, calling on GSS-API in order to
  70.    protect its communications with authentication, integrity, and/or
  71.    confidentiality security services.  A GSS-API caller accepts tokens
  72.    provided to it by its local GSS-API implementation and transfers the
  73.    tokens to a peer on a remote system; that peer passes the received
  74.    tokens to its local GSS-API implementation for processing. The
  75.    security services available through GSS-API in this fashion are
  76.    implementable (and have been implemented) over a range of underlying
  77.    mechanisms based on secret-key and public-key cryptographic
  78.    technologies.
  79.  
  80.    The GSS-API separates the operations of initializing a security
  81.    context between peers, achieving peer entity authentication (This
  82.    security service definition, and other definitions used in this
  83.    document, corresponds to that provided in International Standard ISO
  84.    7498-2-1988(E), Security Architecture.)  (GSS_Init_sec_context()  and
  85.    GSS_Accept_sec_context() calls), from the operations of providing
  86.    per-message data origin authentication and data integrity protection
  87.    (GSS_GetMIC()  and GSS_VerifyMIC()  calls) for messages subsequently
  88.    transferred in conjunction with that context.  When establishing a
  89.    security context, the GSS-API enables a context initiator to
  90.    optionally permit its credentials to be delegated, meaning that the
  91.    context acceptor may initiate further security contexts on behalf of
  92.    the initiating caller. Per-message GSS_Wrap()  and GSS_Unwrap()
  93.    calls provide the data origin authentication and data integrity
  94.    services which GSS_GetMIC()  and GSS_VerifyMIC() offer, and also
  95.    support selection of confidentiality services as a caller option.
  96.    Additional calls provide supportive functions to the GSS-API's users.
  97.  
  98.    The following paragraphs provide an example illustrating the
  99.    dataflows involved in use of the GSS-API by a client and server in a
  100.    mechanism-independent fashion, establishing a security context and
  101.    transferring a protected message. The example assumes that credential
  102.    acquisition has already been completed.  The example assumes that the
  103.    underlying authentication technology is capable of authenticating a
  104.    client to a server using elements carried within a single token, and
  105.    of authenticating the server to the client (mutual authentication)
  106.    with a single returned token; this assumption holds for presently-
  107.    documented CAT mechanisms but is not necessarily true for other
  108.    cryptographic technologies and associated protocols.
  109.  
  110.  
  111.  
  112.  
  113. Linn                Document Expiration: 23 March 1998          [Page 2]
  114.  
  115.  
  116.  
  117.  
  118.  
  119. Internet-Draft                                         23 September 1997
  120.  
  121.  
  122.    The client calls GSS_Init_sec_context()  to establish a security
  123.    context to the server identified by targ_name, and elects to set the
  124.    mutual_req_flag so that mutual authentication is performed in the
  125.    course of context establishment. GSS_Init_sec_context()  returns an
  126.    output_token to be passed to the server, and indicates
  127.    GSS_S_CONTINUE_NEEDED status pending completion of the mutual
  128.    authentication sequence. Had mutual_req_flag not been set, the
  129.    initial call to GSS_Init_sec_context()  would have returned
  130.    GSS_S_COMPLETE status. The client sends the output_token to the
  131.    server.
  132.  
  133.    The server passes the received token as the input_token parameter to
  134.    GSS_Accept_sec_context().  GSS_Accept_sec_context indicates
  135.    GSS_S_COMPLETE status, provides the client's authenticated identity
  136.    in the src_name result, and provides an output_token to be passed to
  137.    the client. The server sends the output_token to the client.
  138.  
  139.    The client passes the received token as the input_token parameter to
  140.    a successor call to GSS_Init_sec_context(),  which processes data
  141.    included in the token in order to achieve mutual authentication from
  142.    the client's viewpoint. This call to GSS_Init_sec_context()  returns
  143.    GSS_S_COMPLETE status, indicating successful mutual authentication
  144.    and the completion of context establishment for this example.
  145.  
  146.    The client generates a data message and passes it to GSS_Wrap().
  147.    GSS_Wrap() performs data origin authentication, data integrity, and
  148.    (optionally) confidentiality processing on the message and
  149.    encapsulates the result into output_message, indicating
  150.    GSS_S_COMPLETE status. The client sends the output_message to the
  151.    server.
  152.  
  153.    The server passes the received message to GSS_Unwrap().  GSS_Unwrap()
  154.    inverts the encapsulation performed by GSS_Wrap(),  deciphers the
  155.    message if the optional confidentiality feature was applied, and
  156.    validates the data origin authentication and data integrity checking
  157.    quantities. GSS_Unwrap()  indicates successful validation by
  158.    returning GSS_S_COMPLETE status along with the resultant
  159.    output_message.
  160.  
  161.    For purposes of this example, we assume that the server knows by
  162.    out-of-band means that this context will have no further use after
  163.    one protected message is transferred from client to server. Given
  164.    this premise, the server now calls GSS_Delete_sec_context() to flush
  165.    context-level information.  Optionally, the server-side application
  166.    may provide a token buffer to GSS_Delete_sec_context(), to receive a
  167.    context_token to be transferred to the client in order to request
  168.    that client-side context-level information be deleted.
  169.  
  170.  
  171.  
  172.  
  173. Linn                Document Expiration: 23 March 1998          [Page 3]
  174.  
  175.  
  176.  
  177.  
  178.  
  179. Internet-Draft                                         23 September 1997
  180.  
  181.  
  182.    If a context_token is transferred, the client passes the
  183.    context_token to GSS_Process_context_token(), which returns
  184.    GSS_S_COMPLETE status after deleting context-level information at the
  185.    client system.
  186.  
  187.    The GSS-API design assumes and addresses several basic goals,
  188.    including:
  189.  
  190.       Mechanism independence: The GSS-API defines an interface to
  191.       cryptographically implemented strong authentication and other
  192.       security services at a generic level which is independent of
  193.       particular underlying mechanisms. For example, GSS-API-provided
  194.       services can be implemented by secret-key technologies (e.g.,
  195.       Kerberos) or public-key approaches (e.g., X.509).
  196.  
  197.       Protocol environment independence: The GSS-API is independent of
  198.       the communications protocol suites with which it is employed,
  199.       permitting use in a broad range of protocol environments. In
  200.       appropriate environments, an intermediate implementation "veneer"
  201.       which is oriented to a particular communication protocol (e.g.,
  202.       Remote Procedure Call (RPC)) may be interposed between
  203.       applications which call that protocol and the GSS-API, thereby
  204.       invoking GSS-API facilities in conjunction with that protocol's
  205.       communications invocations.
  206.  
  207.       Protocol association independence: The GSS-API's security context
  208.       construct is independent of communications protocol association
  209.       constructs. This characteristic allows a single GSS-API
  210.       implementation to be utilized by a variety of invoking protocol
  211.       modules on behalf of those modules' calling applications. GSS-API
  212.       services can also be invoked directly by applications, wholly
  213.       independent of protocol associations.
  214.  
  215.       Suitability to a range of implementation placements: GSS-API
  216.       clients are not constrained to reside within any Trusted Computing
  217.       Base (TCB) perimeter defined on a system where the GSS-API is
  218.       implemented; security services are specified in a manner suitable
  219.       to both intra-TCB and extra-TCB callers.
  220.  
  221. 1.1: GSS-API Constructs
  222.  
  223.    This section describes the basic elements comprising the GSS-API.
  224.  
  225. 1.1.1:  Credentials
  226.  
  227. 1.1.1.1: Credential Constructs and Concepts
  228.  
  229.    Credentials provide the prerequisites which permit GSS-API peers to
  230.  
  231.  
  232.  
  233. Linn                Document Expiration: 23 March 1998          [Page 4]
  234.  
  235.  
  236.  
  237.  
  238.  
  239. Internet-Draft                                         23 September 1997
  240.  
  241.  
  242.    establish security contexts with each other. A caller may designate
  243.    that the credential elements which are to be applied for context
  244.    initiation or acceptance be selected by default.  Alternately, those
  245.    GSS-API callers which need to make explicit selection of particular
  246.    credentials structures may make references to those credentials
  247.    through GSS-API-provided credential handles ("cred_handles").  In all
  248.    cases, callers' credential references are indirect, mediated by GSS-
  249.    API implementations and not requiring callers to access the selected
  250.    credential elements.
  251.  
  252.    A single credential structure may be used to initiate outbound
  253.    contexts and to accept inbound contexts. Callers needing to operate
  254.    in only one of these modes may designate this fact when credentials
  255.    are acquired for use, allowing underlying mechanisms to optimize
  256.    their processing and storage requirements. The credential elements
  257.    defined by a particular mechanism may contain multiple cryptographic
  258.    keys, e.g., to enable authentication and message encryption to be
  259.    performed with different algorithms.
  260.  
  261.    A GSS-API credential structure may contain multiple credential
  262.    elements, each containing mechanism-specific information for a
  263.    particular underlying mechanism (mech_type), but the set of elements
  264.    within a given credential structure represent a common entity.  A
  265.    credential structure's contents will vary depending on the set of
  266.    mech_types supported by a particular GSS-API implementation. Each
  267.    credential element identifies the data needed by its mechanism in
  268.    order to establish contexts on behalf of a particular principal, and
  269.    may contain separate credential references for use in context
  270.    initiation and context acceptance.  Multiple credential elements
  271.    within a given credential having overlapping combinations of
  272.    mechanism, usage mode, and validity period are not permitted.
  273.  
  274.    Commonly, a single mech_type will be used for all security contexts
  275.    established by a particular initiator to a particular target. A major
  276.    motivation for supporting credential sets representing multiple
  277.    mech_types is to allow initiators on systems which are equipped to
  278.    handle multiple types to initiate contexts to targets on other
  279.    systems which can accommodate only a subset of the set supported at
  280.    the initiator's system.
  281.  
  282. 1.1.1.2: Credential Management
  283.  
  284.    It is the responsibility of underlying system-specific mechanisms and
  285.    OS functions below the GSS-API to ensure that the ability to acquire
  286.    and use credentials associated with a given identity is constrained
  287.    to appropriate processes within a system. This responsibility should
  288.    be taken seriously by implementors, as the ability for an entity to
  289.    utilize a principal's credentials is equivalent to the entity's
  290.  
  291.  
  292.  
  293. Linn                Document Expiration: 23 March 1998          [Page 5]
  294.  
  295.  
  296.  
  297.  
  298.  
  299. Internet-Draft                                         23 September 1997
  300.  
  301.  
  302.    ability to successfully assert that principal's identity.
  303.  
  304.    Once a set of GSS-API credentials is established, the transferability
  305.    of that credentials set to other processes or analogous constructs
  306.    within a system is a local matter, not defined by the GSS-API. An
  307.    example local policy would be one in which any credentials received
  308.    as a result of login to a given user account, or of delegation of
  309.    rights to that account, are accessible by, or transferable to,
  310.    processes running under that account.
  311.  
  312.    The credential establishment process (particularly when performed on
  313.    behalf of users rather than server processes) is likely to require
  314.    access to passwords or other quantities which should be protected
  315.    locally and exposed for the shortest time possible. As a result, it
  316.    will often be appropriate for preliminary credential establishment to
  317.    be performed through local means at user login time, with the
  318.    result(s) cached for subsequent reference. These preliminary
  319.    credentials would be set aside (in a system-specific fashion) for
  320.    subsequent use, either:
  321.  
  322.       to be accessed by an invocation of the GSS-API GSS_Acquire_cred()
  323.       call, returning an explicit handle to reference that credential
  324.  
  325.       to comprise default credential elements to be installed, and to be
  326.       used when default credential behavior is requested on behalf of a
  327.       process
  328.  
  329. 1.1.1.3: Default Credential Resolution
  330.  
  331.    The gss_init_sec_context and gss_accept_sec_context routines allow
  332.    the value GSS_C_NO_CREDENTIAL to be specified as their credential
  333.    handle parameter.  This special credential-handle indicates a desire
  334.    by the application to act as a default principal. In support of
  335.    application portability, support for the default resolution behavior
  336.    described below for initiator credentials (GSS_Init_sec_context()
  337.    usage) is mandated; support for the default resolution behavior
  338.    described below for acceptor credentials (GSS_Accept_sec_context()
  339.    usage) is recommended. If default credential resolution fails,
  340.    GSS_S_NO_CRED status is to be returned.
  341.  
  342.  
  343.       GSS_Init_sec_context:
  344.  
  345.          (i) If there is only a single principal capable of initiating
  346.          security contexts that the application is authorized to act on
  347.          behalf of, then that principal shall be used, otherwise
  348.  
  349.          (ii) If the platform maintains a concept of a default network-
  350.  
  351.  
  352.  
  353. Linn                Document Expiration: 23 March 1998          [Page 6]
  354.  
  355.  
  356.  
  357.  
  358.  
  359. Internet-Draft                                         23 September 1997
  360.  
  361.  
  362.          identity, and if the application is authorized to act on behalf
  363.          of that identity for the purpose of initiating security
  364.          contexts, then the principal corresponding to that identity
  365.          shall be used, otherwise
  366.  
  367.          (iii) If the platform maintains a concept of a default local
  368.          identity, and provides a means to map local identities into
  369.          network-identities, and if the application is authorized to act
  370.          on behalf of the network-identity image of the default local
  371.          identity for the purpose of initiating security contexts, then
  372.          the principal corresponding to that identity shall be used,
  373.          otherwise
  374.  
  375.          (iv) A user-configurable default identity should be used.
  376.  
  377.       GSS_Accept_sec_context:
  378.  
  379.          (i) If there is only a single authorized principal identity
  380.          capable of accepting security contexts, then that principal
  381.          shall be used, otherwise
  382.  
  383.          (ii) If the mechanism can determine the identity of the target
  384.          principal by examining the context-establishment token, and if
  385.          the accepting application is authorized to act as that
  386.          principal for the purpose of accepting security contexts, then
  387.          that principal identity shall be used, otherwise
  388.  
  389.          (iii) If the mechanism supports context acceptance by any
  390.          principal, and mutual authentication was not requested, any
  391.          principal that the application is authorized to accept security
  392.          contexts under may be used, otherwise
  393.  
  394.          (iv) A user-configurable default identity shall be used.
  395.  
  396.    The purpose of the above rules is to allow security contexts to be
  397.    established by both initiator and acceptor using the default behavior
  398.    wherever possible.  Applications requesting default behavior are
  399.    likely to be more portable across mechanisms and platforms than ones
  400.    that use GSS_Acquire_cred to request a specific identity.
  401.  
  402. 1.1.2: Tokens
  403.  
  404.    Tokens are data elements transferred between GSS-API callers, and are
  405.    divided into two classes. Context-level tokens are exchanged in order
  406.    to establish and manage a security context between peers. Per-message
  407.    tokens relate to an established context and are exchanged to provide
  408.    protective security services (i.e., data origin authentication,
  409.    integrity, and optional confidentiality) for corresponding data
  410.  
  411.  
  412.  
  413. Linn                Document Expiration: 23 March 1998          [Page 7]
  414.  
  415.  
  416.  
  417.  
  418.  
  419. Internet-Draft                                         23 September 1997
  420.  
  421.  
  422.    messages.
  423.  
  424.    The first context-level token obtained from GSS_Init_sec_context() is
  425.    required to indicate at its very beginning a globally-interpretable
  426.    mechanism identifier, i.e., an Object Identifier (OID) of the
  427.    security mechanism. The remaining part of this token as well as the
  428.    whole content of all other tokens are specific to the particular
  429.    underlying mechanism used to support the GSS-API. Section 3 of this
  430.    document provides, for designers of GSS-API support mechanisms, the
  431.    description of the header of the first context-level token which is
  432.    then followed by mechanism-specific information.
  433.  
  434.    Tokens' contents are opaque from the viewpoint of GSS-API callers.
  435.    They are generated within the GSS-API implementation at an end
  436.    system, provided to a GSS-API caller to be transferred to the peer
  437.    GSS-API caller at a remote end system, and processed by the GSS-API
  438.    implementation at that remote end system. Tokens may be output by
  439.    GSS-API calls (and should be transferred to GSS-API peers) whether or
  440.    not the calls' status indicators indicate successful completion.
  441.    Token transfer may take place in an in-band manner, integrated into
  442.    the same protocol stream used by the GSS-API callers for other data
  443.    transfers, or in an out-of-band manner across a logically separate
  444.    channel.  Zero-length tokens are never returned by GSS routines for
  445.    transfer to a peer.
  446.  
  447.    Different GSS-API tokens are used for different purposes (e.g.,
  448.    context initiation, context acceptance, protected message data on an
  449.    established context), and it is the responsibility of a GSS-API
  450.    caller receiving tokens to distinguish their types, associate them
  451.    with corresponding security contexts, and pass them to appropriate
  452.    GSS-API processing routines.  Depending on the caller protocol
  453.    environment, this distinction may be accomplished in several ways.
  454.  
  455.    The following examples illustrate means through which tokens' types
  456.    may be distinguished:
  457.  
  458.       - implicit tagging based on state information (e.g., all tokens on
  459.       a new association are considered to be context establishment
  460.       tokens until context establishment is completed, at which point
  461.       all tokens are considered to be wrapped data objects for that
  462.       context),
  463.  
  464.       - explicit tagging at the caller protocol level,
  465.  
  466.       - a hybrid of these approaches.
  467.  
  468.    Commonly, the encapsulated data within a token includes internal
  469.    mechanism-specific tagging information, enabling mechanism-level
  470.  
  471.  
  472.  
  473. Linn                Document Expiration: 23 March 1998          [Page 8]
  474.  
  475.  
  476.  
  477.  
  478.  
  479. Internet-Draft                                         23 September 1997
  480.  
  481.  
  482.    processing modules to distinguish tokens used within the mechanism
  483.    for different purposes.  Such internal mechanism-level tagging is
  484.    recommended to mechanism designers, and enables mechanisms to
  485.    determine whether a caller has passed a particular token for
  486.    processing by an inappropriate GSS-API routine.
  487.  
  488.    Development of GSS-API support primitives based on a particular
  489.    underlying cryptographic technique and protocol (i.e., conformant to
  490.    a specific GSS-API mechanism definition) does not necessarily imply
  491.    that GSS-API callers using that GSS-API mechanism will be able to
  492.    interoperate with peers invoking the same technique and protocol
  493.    outside the GSS-API paradigm, or with peers implementing a different
  494.    GSS-API mechanism based on the same underlying technology.  The
  495.    format of GSS-API tokens defined in conjunction with a particular
  496.    mechanism, and the techniques used to integrate those tokens into
  497.    callers' protocols, may not be interoperable with the tokens used by
  498.    non-GSS-API callers of the same underlying technique.
  499.  
  500. 1.1.3:  Security Contexts
  501.  
  502.    Security contexts are established between peers, using credentials
  503.    established locally in conjunction with each peer or received by
  504.    peers via delegation. Multiple contexts may exist simultaneously
  505.    between a pair of peers, using the same or different sets of
  506.    credentials. Coexistence of multiple contexts using different
  507.    credentials allows graceful rollover when credentials expire.
  508.    Distinction among multiple contexts based on the same credentials
  509.    serves applications by distinguishing different message streams in a
  510.    security sense.
  511.  
  512.    The GSS-API is independent of underlying protocols and addressing
  513.    structure, and depends on its callers to transport GSS-API-provided
  514.    data elements. As a result of these factors, it is a caller
  515.    responsibility to parse communicated messages, separating GSS-API-
  516.    related data elements from caller-provided data.  The GSS-API is
  517.    independent of connection vs. connectionless orientation of the
  518.    underlying communications service.
  519.  
  520.    No correlation between security context and communications protocol
  521.    association is dictated. (The optional channel binding facility,
  522.    discussed in Section 1.1.6 of this document, represents an
  523.    intentional exception to this rule, supporting additional protection
  524.    features within GSS-API supporting mechanisms.)  This separation
  525.    allows the GSS-API to be used in a wide range of communications
  526.    environments, and also simplifies the calling sequences of the
  527.    individual calls. In many cases (depending on underlying security
  528.    protocol, associated mechanism, and availability of cached
  529.    information), the state information required for context setup can be
  530.  
  531.  
  532.  
  533. Linn                Document Expiration: 23 March 1998          [Page 9]
  534.  
  535.  
  536.  
  537.  
  538.  
  539. Internet-Draft                                         23 September 1997
  540.  
  541.  
  542.    sent concurrently with initial signed user data, without interposing
  543.    additional message exchanges.
  544.  
  545. 1.1.4:  Mechanism Types
  546.  
  547.    In order to successfully establish a security context with a target
  548.    peer, it is necessary to identify an appropriate underlying mechanism
  549.    type (mech_type) which both initiator and target peers support. The
  550.    definition of a mechanism embodies not only the use of a particular
  551.    cryptographic technology (or a hybrid or choice among alternative
  552.    cryptographic technologies), but also definition of the syntax and
  553.    semantics of data element exchanges which that mechanism will employ
  554.    in order to support security services.
  555.  
  556.    It is recommended that callers initiating contexts specify the
  557.    "default" mech_type value, allowing system-specific functions within
  558.    or invoked by the GSS-API implementation to select the appropriate
  559.    mech_type, but callers may direct that a particular mech_type be
  560.    employed when necessary.
  561.  
  562.    For GSS-API purposes, the phrase "negotiating mechanism" refers to a
  563.    mechanism which itself performs negotiation in order to select a
  564.    concrete mechanism which is shared between peers and is then used for
  565.    context establishment.  Only those mechanisms which are defined in
  566.    their specifications as negotiating mechanisms are to yield selected
  567.    mechanisms with different identifier values than the value which is
  568.    input by a GSS-API caller.
  569.  
  570.    The means for identifying a shared mech_type to establish a security
  571.    context with a peer will vary in different environments and
  572.    circumstances; examples include (but are not limited to):
  573.  
  574.       use of a fixed mech_type, defined by configuration, within an
  575.       environment
  576.  
  577.       syntactic convention on a target-specific basis, through
  578.       examination of a target's name
  579.  
  580.       lookup of a target's name in a naming service or other database in
  581.       order to identify mech_types supported by that target
  582.  
  583.       explicit negotiation between GSS-API callers in advance of
  584.       security context setup
  585.  
  586.       use of a negotiating mechanism
  587.  
  588.    When transferred between GSS-API peers, mech_type specifiers (per
  589.    Section 3, represented as Object Identifiers (OIDs)) serve to qualify
  590.  
  591.  
  592.  
  593. Linn               Document Expiration: 23 March 1998          [Page 10]
  594.  
  595.  
  596.  
  597.  
  598.  
  599. Internet-Draft                                         23 September 1997
  600.  
  601.  
  602.    the interpretation of associated tokens. (The structure and encoding
  603.    of Object Identifiers is defined in ISO/IEC 8824, "Specification of
  604.    Abstract Syntax Notation One (ASN.1)" and in ISO/IEC 8825,
  605.    "Specification of Basic Encoding Rules for Abstract Syntax Notation
  606.    One (ASN.1)".)  Use of hierarchically structured OIDs serves to
  607.    preclude ambiguous interpretation of mech_type specifiers. The OID
  608.    representing the DASS MechType, for example, is 1.3.12.2.1011.7.5,
  609.    and that of the Kerberos V5 mechanism, once advanced to the level of
  610.    Proposed Standard, will be 1.2.840.113554.1.2.2.
  611.  
  612. 1.1.5:  Naming
  613.  
  614.    The GSS-API avoids prescribing naming structures, treating the names
  615.    which are transferred across the interface in order to initiate and
  616.    accept security contexts as opaque objects.  This approach supports
  617.    the GSS-API's goal of implementability atop a range of underlying
  618.    security mechanisms, recognizing the fact that different mechanisms
  619.    process and authenticate names which are presented in different
  620.    forms. Generalized services offering translation functions among
  621.    arbitrary sets of naming environments are outside the scope of the
  622.    GSS-API; availability and use of local conversion functions to
  623.    translate among the naming formats supported within a given end
  624.    system is anticipated.
  625.  
  626.    Different classes of name representations are used in conjunction
  627.    with different GSS-API parameters:
  628.  
  629.       - Internal form (denoted in this document by INTERNAL NAME),
  630.       opaque to callers and defined by individual GSS-API
  631.       implementations.  GSS-API implementations supporting multiple
  632.       namespace types must maintain internal tags to disambiguate the
  633.       interpretation of particular names.  A Mechanism Name (MN) is a
  634.       special case of INTERNAL NAME, guaranteed to contain elements
  635.       corresponding to one and only one mechanism; calls which are
  636.       guaranteed to emit MNs or which require MNs as input are so
  637.       identified within this specification.
  638.  
  639.       - Contiguous string ("flat") form (denoted in this document by
  640.       OCTET STRING); accompanied by OID tags identifying the namespace
  641.       to which they correspond.  Depending on tag value, flat names may
  642.       or may not be printable strings for direct acceptance from and
  643.       presentation to users. Tagging of flat names allows GSS-API
  644.       callers and underlying GSS-API mechanisms to disambiguate name
  645.       types and to determine whether an associated name's type is one
  646.       which they are capable of processing, avoiding aliasing problems
  647.       which could result from misinterpreting a name of one type as a
  648.       name of another type.
  649.  
  650.  
  651.  
  652.  
  653. Linn               Document Expiration: 23 March 1998          [Page 11]
  654.  
  655.  
  656.  
  657.  
  658.  
  659. Internet-Draft                                         23 September 1997
  660.  
  661.  
  662.       - The GSS-API Exported Name Object, a special case of flat name
  663.       designated by a reserved OID value, carries a canonicalized form
  664.       of a name suitable for binary comparisons.
  665.  
  666.    In addition to providing means for names to be tagged with types,
  667.    this specification defines primitives to support a level of naming
  668.    environment independence for certain calling applications. To provide
  669.    basic services oriented towards the requirements of callers which
  670.    need not themselves interpret the internal syntax and semantics of
  671.    names, GSS-API calls for name comparison (GSS_Compare_name()),
  672.    human-readable display (GSS_Display_name()), input conversion
  673.    (GSS_Import_name()), internal name deallocation (GSS_Release_name()),
  674.    and internal name duplication (GSS_Duplicate_name()) functions are
  675.    defined. (It is anticipated that these proposed GSS-API calls will be
  676.    implemented in many end systems based on system-specific name
  677.    manipulation primitives already extant within those end systems;
  678.    inclusion within the GSS-API is intended to offer GSS-API callers a
  679.    portable means to perform specific operations, supportive of
  680.    authorization and audit requirements, on authenticated names.)
  681.  
  682.    GSS_Import_name() implementations can, where appropriate, support
  683.    more than one printable syntax corresponding to a given namespace
  684.    (e.g., alternative printable representations for X.500 Distinguished
  685.    Names), allowing flexibility for their callers to select among
  686.    alternative representations. GSS_Display_name() implementations
  687.    output a printable syntax selected as appropriate to their
  688.    operational environments; this selection is a local matter. Callers
  689.    desiring portability across alternative printable syntaxes should
  690.    refrain from implementing comparisons based on printable name forms
  691.    and should instead use the GSS_Compare_name()  call to determine
  692.    whether or not one internal-format name matches another.
  693.  
  694.    When used in large access control lists, the overhead of invoking
  695.    GSS_Import_name() and GSS_Compare_name() on each name from the ACL
  696.    may be prohibitive.  As an alternative way of supporting this case,
  697.    GSS-API defines a special form of the contiguous string name which
  698.    may be compared directly (e.g., with memcmp()).  Contiguous names
  699.    suitable for comparison are generated by the GSS_Export_name()
  700.    routine, which requires an MN as input.  Exported names may be re-
  701.    imported by the gss_import_name() routine, and the resulting internal
  702.    name will also be an MN.  The gss_OID constant GSS_C_NT_EXPORT_NAME
  703.    indentifies the "export name" type. Structurally, an exported name
  704.    object consists of a header containing an OID identifying the
  705.    mechanism that authenticated the name, and a trailer containing the
  706.    name itself, where the syntax of the trailer is defined by the
  707.    individual mechanism specification.   The precise format of an export
  708.    name is defined in Section 3.2 of this specification.
  709.  
  710.  
  711.  
  712.  
  713. Linn               Document Expiration: 23 March 1998          [Page 12]
  714.  
  715.  
  716.  
  717.  
  718.  
  719. Internet-Draft                                         23 September 1997
  720.  
  721.  
  722.    Note that the results obtained by using GSS_Compare_name() will in
  723.    general be different from those obtained by invoking
  724.    GSS_Canonicalize_name() and GSS_Export_name(), and then comparing the
  725.    exported names.  The first series of operation determines whether two
  726.    (unauthenticated) names identify the same principal; the second
  727.    whether a particular mechanism would authenticate them as the same
  728.    principal.  These two operations will in general give the same
  729.    results only for MNs.
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773. Linn               Document Expiration: 23 March 1998          [Page 13]
  774.  
  775.  
  776.  
  777.  
  778.  
  779. Internet-Draft                                         23 September 1997
  780.  
  781.  
  782.    The following diagram illustrates the intended dataflow among name-
  783.    related GSS-API processing routines.
  784.  
  785.                         GSS-API library defaults
  786.                                |
  787.                                |
  788.                                V                         text, for
  789.    text -------------->  internal_name (IN) -----------> display only
  790.          import_name()          /          display_name()
  791.                                /
  792.                               /
  793.                              /
  794.     accept_sec_context()    /
  795.           |                /
  796.           |               /
  797.           |              /  canonicalize_name()
  798.           |             /
  799.           |            /
  800.           |           /
  801.           |          /
  802.           |         /
  803.           |        |
  804.           V        V     <---------------------
  805.     single mechanism        import_name()         exported name: flat
  806.     internal_name (MN)                            binary "blob" usable
  807.                          ---------------------->  for access control
  808.                             export_name()
  809.  
  810. 1.1.6:  Channel Bindings
  811.  
  812.    The GSS-API accommodates the concept of caller-provided channel
  813.    binding ("chan_binding") information.  Channel bindings are used to
  814.    strengthen the quality with which peer entity authentication is
  815.    provided during context establishment, by limiting the scope within
  816.    which an intercepted context establishment token can be reused by an
  817.    attacker. Specifically, they enable GSS-API callers to bind the
  818.    establishment of a security context to relevant characteristics
  819.    (e.g., addresses, transformed representations of encryption keys) of
  820.    the underlying communications channel, of protection mechanisms
  821.    applied to that communications channel, and to application-specific
  822.    data.
  823.  
  824.    The caller initiating a security context must determine the
  825.    appropriate channel binding values to provide as input to the
  826.    GSS_Init_sec_context() call, and consistent values must be provided
  827.    to GSS_Accept_sec_context() by the context's target, in order for
  828.    both peers' GSS-API mechanisms to validate that received tokens
  829.    possess correct channel-related characteristics. Use or non-use of
  830.  
  831.  
  832.  
  833. Linn               Document Expiration: 23 March 1998          [Page 14]
  834.  
  835.  
  836.  
  837.  
  838.  
  839. Internet-Draft                                         23 September 1997
  840.  
  841.  
  842.    the GSS-API channel binding facility is a caller option.  GSS-API
  843.    mechanisms can operate in an environment where NULL channel bindings
  844.    are presented; mechanism implementors are encouraged, but not
  845.    required, to make use of caller-provided channel binding data within
  846.    their mechanisms. Callers should not assume that underlying
  847.    mechanisms provide confidentiality protection for channel binding
  848.    information.
  849.  
  850.    When non-NULL channel bindings are provided by callers, certain
  851.    mechanisms can offer enhanced security value by interpreting the
  852.    bindings' content (rather than simply representing those bindings, or
  853.    integrity check values computed on them, within tokens) and will
  854.    therefore depend on presentation of specific data in a defined
  855.    format. To this end, agreements among mechanism implementors are
  856.    defining conventional interpretations for the contents of channel
  857.    binding arguments, including address specifiers (with content
  858.    dependent on communications protocol environment) for context
  859.    initiators and acceptors. (These conventions are being incorporated
  860.    in GSS-API mechanism specifications and into the GSS-API C language
  861.    bindings specification.)  In order for GSS-API callers to be portable
  862.    across multiple mechanisms and achieve the full security
  863.    functionality which each mechanism can provide, it is strongly
  864.    recommended that GSS-API callers provide channel bindings consistent
  865.    with these conventions and those of the networking environment in
  866.    which they operate.
  867.  
  868. 1.2:  GSS-API Features and Issues
  869.  
  870.    This section describes aspects of GSS-API operations, of the security
  871.    services which the GSS-API provides, and provides commentary on
  872.    design issues.
  873.  
  874. 1.2.1:  Status Reporting and Optional Service Support
  875.  
  876. 1.2.1.1: Status Reporting
  877.  
  878.    Each GSS-API call provides two status return values. Major_status
  879.    values provide a mechanism-independent indication of call status
  880.    (e.g., GSS_S_COMPLETE, GSS_S_FAILURE, GSS_S_CONTINUE_NEEDED),
  881.    sufficient to drive normal control flow within the caller in a
  882.    generic fashion. Table 1 summarizes the defined major_status return
  883.    codes in tabular fashion.
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893. Linn               Document Expiration: 23 March 1998          [Page 15]
  894.  
  895.  
  896.  
  897.  
  898.  
  899. Internet-Draft                                         23 September 1997
  900.  
  901.  
  902.    Table 1: GSS-API Major Status Codes
  903.  
  904.    FATAL ERROR CODES
  905.  
  906.    GSS_S_BAD_BINDINGS            channel binding mismatch
  907.    GSS_S_BAD_MECH                unsupported mechanism requested
  908.    GSS_S_BAD_NAME                invalid name provided
  909.    GSS_S_BAD_NAMETYPE            name of unsupported type provided
  910.    GSS_S_BAD_STATUS              invalid input status selector
  911.    GSS_S_BAD_SIG                 token had invalid integrity check
  912.    GSS_S_BAD_MIC                   preferred alias for GSS_S_BAD_SIG
  913.    GSS_S_CONTEXT_EXPIRED         specified security context expired
  914.    GSS_S_CREDENTIALS_EXPIRED     expired credentials detected
  915.    GSS_S_DEFECTIVE_CREDENTIAL    defective credential detected
  916.    GSS_S_DEFECTIVE_TOKEN         defective token detected
  917.    GSS_S_FAILURE                 failure, unspecified at GSS-API
  918.                                    level
  919.    GSS_S_NO_CONTEXT              no valid security context specified
  920.    GSS_S_NO_CRED                 no valid credentials provided
  921.    GSS_S_BAD_QOP                 unsupported QOP value
  922.    GSS_S_UNAUTHORIZED            operation unauthorized
  923.    GSS_S_UNAVAILABLE             operation unavailable
  924.    GSS_S_DUPLICATE_ELEMENT       duplicate credential element requested
  925.    GSS_S_NAME_NOT_MN             name contains multi-mechanism elements
  926.  
  927.    INFORMATORY STATUS CODES
  928.  
  929.    GSS_S_COMPLETE                normal completion
  930.    GSS_S_CONTINUE_NEEDED         continuation call to routine
  931.                                   required
  932.    GSS_S_DUPLICATE_TOKEN         duplicate per-message token
  933.                                   detected
  934.    GSS_S_OLD_TOKEN               timed-out per-message token
  935.                                   detected
  936.    GSS_S_UNSEQ_TOKEN             reordered (early) per-message token
  937.                                   detected
  938.    GSS_S_GAP_TOKEN               skipped predecessor token(s)
  939.                                   detected
  940.  
  941.    Minor_status provides more detailed status information which may
  942.    include status codes specific to the underlying security mechanism.
  943.    Minor_status values are not specified in this document.
  944.  
  945.    GSS_S_CONTINUE_NEEDED major_status returns, and optional message
  946.    outputs, are provided in GSS_Init_sec_context() and
  947.    GSS_Accept_sec_context()  calls so that different mechanisms'
  948.    employment of different numbers of messages within their
  949.    authentication sequences need not be reflected in separate code paths
  950.  
  951.  
  952.  
  953. Linn               Document Expiration: 23 March 1998          [Page 16]
  954.  
  955.  
  956.  
  957.  
  958.  
  959. Internet-Draft                                         23 September 1997
  960.  
  961.  
  962.    within calling applications. Instead, such cases are accommodated
  963.    with sequences of continuation calls to GSS_Init_sec_context()  and
  964.    GSS_Accept_sec_context().  The same mechanism is used to encapsulate
  965.    mutual authentication within the GSS-API's context initiation calls.
  966.  
  967.    For mech_types which require interactions with third-party servers in
  968.    order to establish a security context, GSS-API context establishment
  969.    calls may block pending completion of such third-party interactions.
  970.    On the other hand, no GSS-API calls pend on serialized interactions
  971.    with GSS-API peer entities.  As a result, local GSS-API status
  972.    returns cannot reflect unpredictable or asynchronous exceptions
  973.    occurring at remote peers, and reflection of such status information
  974.    is a caller responsibility outside the GSS-API.
  975.  
  976. 1.2.1.2: Optional Service Support
  977.  
  978.    A context initiator may request various optional services at context
  979.    establishment time. Each of these services is requested by setting a
  980.    flag in the req_flags input parameter to GSS_Init_sec_context().
  981.  
  982.    The optional services currently defined are:
  983.  
  984.         - Delegation - The (usually temporary) transfer of rights from
  985.         initiator to acceptor, enabling the acceptor to authenticate
  986.         itself as an agent of the initiator.
  987.  
  988.         - Mutual Authentication - In addition to the initiator
  989.         authenticating its identity to the context acceptor, the context
  990.         acceptor should also authenticate itself to the initiator.
  991.  
  992.         - Replay detection - In addition to providing message integrity
  993.         services, GSS_GetMIC() and GSS_Wrap() should include message
  994.         numbering information to enable GSS_VerifyMIC() and GSS_Unwrap()
  995.         to detect if a message has been duplicated.
  996.  
  997.         - Out-of-sequence detection - In addition to providing message
  998.         integrity services, GSS_GetMIC() and GSS_Wrap() should include
  999.         message sequencing information to enable GSS_VerifyMIC() and
  1000.         GSS_Unwrap() to detect if a message has been received out of
  1001.         sequence.
  1002.  
  1003.         - Anonymous authentication - The establishment of the security
  1004.         context should not reveal the initiator's identity to the
  1005.         context acceptor.
  1006.  
  1007.    Any currently undefined bits within such flag arguments should be
  1008.    ignored by GSS-API implementations when presented by an application,
  1009.    and should be set to zero when returned to the application by the
  1010.  
  1011.  
  1012.  
  1013. Linn               Document Expiration: 23 March 1998          [Page 17]
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019. Internet-Draft                                         23 September 1997
  1020.  
  1021.  
  1022.    GSS-API implementation.
  1023.  
  1024.    Some mechanisms may not support all optional services, and some
  1025.    mechanisms may only support some services in conjunction with others.
  1026.    Both GSS_Init_sec_context() and GSS_Accept_sec_context() inform the
  1027.    applications which services will be available from the context when
  1028.    the establishment phase is complete, via the ret_flags output
  1029.    parameter.  In general, if the security mechanism is capable of
  1030.    providing a requested service, it should do so, even if additional
  1031.    services must be enabled in order to provide the requested service.
  1032.    If the mechanism is incapable of providing a requested service, it
  1033.    should proceed without the service, leaving the application to abort
  1034.    the context establishment process if it considers the requested
  1035.    service to be mandatory.
  1036.  
  1037.    Some mechanisms may specify that support for some services is
  1038.    optional, and that implementors of the mechanism need not provide it.
  1039.    This is most commonly true of the confidentiality service, often
  1040.    because of legal restrictions on the use of data-encryption, but may
  1041.    apply to any of the services.  Such mechanisms are required to send
  1042.    at least one token from acceptor to initiator during context
  1043.    establishment when the initiator indicates a desire to use such a
  1044.    service, so that the initiating GSS-API can correctly indicate
  1045.    whether the service is supported by the acceptor's GSS-API.
  1046.  
  1047. 1.2.2: Per-Message Security Service Availability
  1048.  
  1049.    When a context is established, two flags are returned to indicate the
  1050.    set of per-message protection security services which will be
  1051.    available on the context:
  1052.  
  1053.       the integ_avail flag indicates whether per-message integrity and
  1054.       data origin authentication services are available
  1055.  
  1056.       the conf_avail flag indicates whether per-message confidentiality
  1057.       services are available, and will never be returned TRUE unless the
  1058.       integ_avail flag is also returned TRUE
  1059.  
  1060.       GSS-API callers desiring per-message security services should
  1061.       check the values of these flags at context establishment time, and
  1062.       must be aware that a returned FALSE value for integ_avail means
  1063.       that invocation of GSS_GetMIC()  or GSS_Wrap() primitives on the
  1064.       associated context will apply no cryptographic protection to user
  1065.       data messages.
  1066.  
  1067.    The GSS-API per-message integrity and data origin authentication
  1068.    services provide assurance to a receiving caller that protection was
  1069.    applied to a message by the caller's peer on the security context,
  1070.  
  1071.  
  1072.  
  1073. Linn               Document Expiration: 23 March 1998          [Page 18]
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079. Internet-Draft                                         23 September 1997
  1080.  
  1081.  
  1082.    corresponding to the entity named at context initiation.  The GSS-API
  1083.    per-message confidentiality service provides assurance to a sending
  1084.    caller that the message's content is protected from access by
  1085.    entities other than the context's named peer.
  1086.  
  1087.    The GSS-API per-message protection service primitives, as the
  1088.    category name implies, are oriented to operation at the granularity
  1089.    of protocol data units. They perform cryptographic operations on the
  1090.    data units, transfer cryptographic control information in tokens,
  1091.    and, in the case of GSS_Wrap(), encapsulate the protected data unit.
  1092.    As such, these primitives are not oriented to efficient data
  1093.    protection for stream-paradigm protocols (e.g., Telnet) if
  1094.    cryptography must be applied on an octet-by-octet basis.
  1095.  
  1096. 1.2.3: Per-Message Replay Detection and Sequencing
  1097.  
  1098.    Certain underlying mech_types offer support for replay detection
  1099.    and/or sequencing of messages transferred on the contexts they
  1100.    support. These optionally-selectable protection features are distinct
  1101.    from replay detection and sequencing features applied to the context
  1102.    establishment operation itself; the presence or absence of context-
  1103.    level replay or sequencing features is wholly a function of the
  1104.    underlying mech_type's capabilities, and is not selected or omitted
  1105.    as a caller option.
  1106.  
  1107.    The caller initiating a context provides flags (replay_det_req_flag
  1108.    and sequence_req_flag) to specify whether the use of per-message
  1109.    replay detection and sequencing features is desired on the context
  1110.    being established. The GSS-API implementation at the initiator system
  1111.    can determine whether these features are supported (and whether they
  1112.    are optionally selectable) as a function of mech_type, without need
  1113.    for bilateral negotiation with the target. When enabled, these
  1114.    features provide recipients with indicators as a result of GSS-API
  1115.    processing of incoming messages, identifying whether those messages
  1116.    were detected as duplicates or out-of-sequence. Detection of such
  1117.    events does not prevent a suspect message from being provided to a
  1118.    recipient; the appropriate course of action on a suspect message is a
  1119.    matter of caller policy.
  1120.  
  1121.    The semantics of the replay detection and sequencing services applied
  1122.    to received messages, as visible across the interface which the GSS-
  1123.    API provides to its clients, are as follows:
  1124.  
  1125.    When replay_det_state is TRUE, the possible major_status returns for
  1126.    well-formed and correctly signed messages are as follows:
  1127.  
  1128.       1. GSS_S_COMPLETE indicates that the message was within the window
  1129.       (of time or sequence space) allowing replay events to be detected,
  1130.  
  1131.  
  1132.  
  1133. Linn               Document Expiration: 23 March 1998          [Page 19]
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139. Internet-Draft                                         23 September 1997
  1140.  
  1141.  
  1142.       and that the message was not a replay of a previously-processed
  1143.       message within that window.
  1144.  
  1145.       2. GSS_S_DUPLICATE_TOKEN indicates that the cryptographic
  1146.       checkvalue on the received message was correct, but that the
  1147.       message was recognized as a duplicate of a previously-processed
  1148.       message.
  1149.  
  1150.       3. GSS_S_OLD_TOKEN indicates that the cryptographic checkvalue on
  1151.       the received message was correct, but that the message is too old
  1152.       to be checked for duplication.
  1153.  
  1154.    When sequence_state is TRUE, the possible major_status returns for
  1155.    well-formed and correctly signed messages are as follows:
  1156.  
  1157.       1. GSS_S_COMPLETE indicates that the message was within the window
  1158.       (of time or sequence space) allowing replay events to be detected,
  1159.       that the message was not a replay of a previously-processed
  1160.       message within that window, and that no predecessor sequenced
  1161.       messages are missing relative to the last received message (if
  1162.       any) processed on the context with a correct cryptographic
  1163.       checkvalue.
  1164.  
  1165.       2. GSS_S_DUPLICATE_TOKEN indicates that the integrity check value
  1166.       on the received message was correct, but that the message was
  1167.       recognized as a duplicate of a previously-processed message.
  1168.  
  1169.       3. GSS_S_OLD_TOKEN indicates that the integrity check value on the
  1170.       received message was correct, but that the token is too old to be
  1171.       checked for duplication.
  1172.  
  1173.       4. GSS_S_UNSEQ_TOKEN indicates that the cryptographic checkvalue
  1174.       on the received message was correct, but that it is earlier in a
  1175.       sequenced stream than a message already processed on the context.
  1176.       [Note: Mechanisms can be architected to provide a stricter form of
  1177.       sequencing service, delivering particular messages to recipients
  1178.       only after all predecessor messages in an ordered stream have been
  1179.       delivered.  This type of support is incompatible with the GSS-API
  1180.       paradigm in which recipients receive all messages, whether in
  1181.       order or not, and provide them (one at a time, without intra-GSS-
  1182.       API message buffering) to GSS-API routines for validation.  GSS-
  1183.       API facilities provide supportive functions, aiding clients to
  1184.       achieve strict message stream integrity in an efficient manner in
  1185.       conjunction with sequencing provisions in communications
  1186.       protocols, but the GSS-API does not offer this level of message
  1187.       stream integrity service by itself.]
  1188.  
  1189.       5. GSS_S_GAP_TOKEN indicates that the cryptographic checkvalue on
  1190.  
  1191.  
  1192.  
  1193. Linn               Document Expiration: 23 March 1998          [Page 20]
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199. Internet-Draft                                         23 September 1997
  1200.  
  1201.  
  1202.       the received message was correct, but that one or more predecessor
  1203.       sequenced messages have not been successfully processed relative
  1204.       to the last received message (if any) processed on the context
  1205.       with a correct cryptographic checkvalue.
  1206.  
  1207.    As the message stream integrity features (especially sequencing) may
  1208.    interfere with certain applications' intended communications
  1209.    paradigms, and since support for such features is likely to be
  1210.    resource intensive, it is highly recommended that mech_types
  1211.    supporting these features allow them to be activated selectively on
  1212.    initiator request when a context is established. A context initiator
  1213.    and target are provided with corresponding indicators
  1214.    (replay_det_state and sequence_state), signifying whether these
  1215.    features are active on a given context.
  1216.  
  1217.    An example mech_type supporting per-message replay detection could
  1218.    (when replay_det_state is TRUE) implement the feature as follows: The
  1219.    underlying mechanism would insert timestamps in data elements output
  1220.    by GSS_GetMIC()  and GSS_Wrap(), and would maintain (within a time-
  1221.    limited window) a cache (qualified by originator-recipient pair)
  1222.    identifying received data elements processed by GSS_VerifyMIC()  and
  1223.    GSS_Unwrap(). When this feature is active, exception status returns
  1224.    (GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN) will be provided when
  1225.    GSS_VerifyMIC()  or GSS_Unwrap() is presented with a message which is
  1226.    either a detected duplicate of a prior message or which is too old to
  1227.    validate against a cache of recently received messages.
  1228.  
  1229. 1.2.4:  Quality of Protection
  1230.  
  1231.    Some mech_types provide their users with fine granularity control
  1232.    over the means used to provide per-message protection, allowing
  1233.    callers to trade off security processing overhead dynamically against
  1234.    the protection requirements of particular messages. A per-message
  1235.    quality-of-protection parameter (analogous to quality-of-service, or
  1236.    QOS) selects among different QOP options supported by that mechanism.
  1237.    On context establishment for a multi-QOP mech_type, context-level
  1238.    data provides the prerequisite data for a range of protection
  1239.    qualities.
  1240.  
  1241.    It is expected that the majority of callers will not wish to exert
  1242.    explicit mechanism-specific QOP control and will therefore request
  1243.    selection of a default QOP. Definitions of, and choices among, non-
  1244.    default QOP values are mechanism-specific, and no ordered sequences
  1245.    of QOP values can be assumed equivalent across different mechanisms.
  1246.    Meaningful use of non-default QOP values demands that callers be
  1247.    familiar with the QOP definitions of an underlying mechanism or
  1248.    mechanisms, and is therefore a non-portable construct.  The
  1249.    GSS_S_BAD_QOP major_status value is defined in order to indicate that
  1250.  
  1251.  
  1252.  
  1253. Linn               Document Expiration: 23 March 1998          [Page 21]
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259. Internet-Draft                                         23 September 1997
  1260.  
  1261.  
  1262.    a provided QOP value is unsupported for a security context, most
  1263.    likely because that value is unrecognized by the underlying
  1264.    mechanism.
  1265.  
  1266. 1.2.5: Anonymity Support
  1267.  
  1268.    In certain situations or environments, an application may wish to
  1269.    authenticate a peer and/or protect communications using GSS-API per-
  1270.    message services without revealing its own identity.  For example,
  1271.    consider an application which provides read access to a research
  1272.    database, and which permits queries by arbitrary requestors.  A
  1273.    client of such a service might wish to authenticate the service, to
  1274.    establish trust in the information received from it, but might not
  1275.    wish to disclose its identity to the service for privacy reasons.
  1276.  
  1277.    In ordinary GSS-API usage, a context initiator's identity is made
  1278.    available to the context acceptor as part of the context
  1279.    establishment process.  To provide for anonymity support, a facility
  1280.    (input anon_req_flag to GSS_Init_sec_context()) is provided through
  1281.    which context initiators may request that their identity not be
  1282.    provided to the context acceptor.  Mechanisms are not required to
  1283.    honor this request, but a caller will be informed (via returned
  1284.    anon_state indicator from GSS_Init_sec_context()) whether or not the
  1285.    request is honored. Note that authentication as the anonymous
  1286.    principal does not necessarily imply that credentials are not
  1287.    required in order to establish a context.
  1288.  
  1289.    Section 4.5 of this document defines the Object Identifier value used
  1290.    to identify an anonymous principal.
  1291.  
  1292.    Four possible combinations of anon_state and mutual_state are
  1293.    possible, with the following results:
  1294.  
  1295.       anon_state == FALSE, mutual_state == FALSE: initiator
  1296.       authenticated to target.
  1297.  
  1298.       anon_state == FALSE, mutual_state == TRUE: initiator authenticated
  1299.       to target, target authenticated to initiator.
  1300.  
  1301.       anon_state == TRUE, mutual_state == FALSE: initiator authenticated
  1302.       as anonymous principal to target.
  1303.  
  1304.       anon_state == TRUE, mutual_state == TRUE: initiator authenticated
  1305.       as anonymous principal to target, target authenticated to
  1306.       initiator.
  1307.  
  1308. 1.2.6: Initialization
  1309.  
  1310.  
  1311.  
  1312.  
  1313. Linn               Document Expiration: 23 March 1998          [Page 22]
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319. Internet-Draft                                         23 September 1997
  1320.  
  1321.  
  1322.    No initialization calls (i.e., calls which must be invoked prior to
  1323.    invocation of other facilities in the interface) are defined in GSS-
  1324.    API.  As an implication of this fact, GSS-API implementations must
  1325.    themselves be self-initializing.
  1326.  
  1327. 1.2.7: Per-Message Protection During Context Establishment
  1328.  
  1329.    A facility is defined in GSS-V2 to enable protection and buffering of
  1330.    data messages for later transfer while a security context's
  1331.    establishment is in GSS_S_CONTINUE_NEEDED status, to be used in cases
  1332.    where the caller side already possesses the necessary session key to
  1333.    enable this processing. Specifically, a new state Boolean, called
  1334.    prot_ready_state, is added to the set of information returned by
  1335.    GSS_Init_sec_context(), GSS_Accept_sec_context(), and
  1336.    GSS_Inquire_context().
  1337.  
  1338.    For context establishment calls, this state Boolean is valid and
  1339.    interpretable when the associated major_status is either
  1340.    GSS_S_CONTINUE_NEEDED, or GSS_S_COMPLETE.  Callers of GSS-API (both
  1341.    initiators and acceptors) can assume that per-message protection (via
  1342.    GSS_Wrap(), GSS_Unwrap(), GSS_GetMIC() and GSS_VerifyMIC()) is
  1343.    available and ready for use if either: prot_ready_state == TRUE, or
  1344.    major_status == GSS_S_COMPLETE, though mutual authentication (if
  1345.    requested) cannot be guaranteed until GSS_S_COMPLETE is returned.
  1346.  
  1347.    This achieves full, transparent backward compatibility for GSS-API V1
  1348.    callers, who need not even know of the existence of prot_ready_state,
  1349.    and who will get the expected behavior from GSS_S_COMPLETE, but who
  1350.    will not be able to use per-message protection before GSS_S_COMPLETE
  1351.    is returned.
  1352.  
  1353.    It is not a requirement that GSS-V2 mechanisms ever return TRUE
  1354.    prot_ready_state before completion of context establishment (indeed,
  1355.    some mechanisms will not evolve usable message protection keys,
  1356.    especially at the context acceptor, before context establishment is
  1357.    complete).  It is expected but not required that GSS-V2 mechanisms
  1358.    will return TRUE prot_ready_state upon completion of context
  1359.    establishment if they support per-message protection at all (however
  1360.    GSS-V2 applications should not assume that TRUE prot_ready_state will
  1361.    always be returned together with the GSS_S_COMPLETE major_status,
  1362.    since GSS-V2 implementations may continue to support GSS-V1 mechanism
  1363.    code, which will never return TRUE prot_ready_state).
  1364.  
  1365.    When prot_ready_state is returned TRUE, mechanisms shall also set
  1366.    those context service indicator flags (deleg_state, mutual_state,
  1367.    replay_det_state, sequence_state, anon_state, trans_state,
  1368.    conf_avail, integ_avail) which represent facilities confirmed, at
  1369.    that time, to be available on the context being established.  In
  1370.  
  1371.  
  1372.  
  1373. Linn               Document Expiration: 23 March 1998          [Page 23]
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379. Internet-Draft                                         23 September 1997
  1380.  
  1381.  
  1382.    situations where prot_ready_state is returned before GSS_S_COMPLETE,
  1383.    it is possible that additional facilities may be confirmed and
  1384.    subsequently indicated when GSS_S_COMPLETE is returned.
  1385.  
  1386. 1.2.8: Implementation Robustness
  1387.  
  1388.    This section recommends aspects of GSS-API implementation behavior in
  1389.    the interests of overall robustness.
  1390.  
  1391.    If a token is presented for processing on a GSS-API security context
  1392.    and that token is determined to be invalid for that context, the
  1393.    context's state should not be disrupted for purposes of processing
  1394.    subsequent valid tokens.
  1395.  
  1396.    Certain local conditions at a GSS-API implementation (e.g.,
  1397.    unavailability of memory) may preclude, temporarily or permanently,
  1398.    the successful processing of tokens on a GSS-API security context,
  1399.    typically generating GSS_S_FAILURE major_status returns along with
  1400.    locally-significant minor_status.  For robust operation under such
  1401.    conditions, the following recommendations are made:
  1402.  
  1403.      Failing calls should free any memory they allocate, so that callers
  1404.      may retry without causing further loss of resources.
  1405.  
  1406.      Failure of an individual call on an established context should not
  1407.      preclude subsequent calls from succeeding on the same context.
  1408.  
  1409.      Whenever possible, it should be possible for
  1410.      GSS_Delete_sec_context() calls to be successfully processed even if
  1411.      other calls cannot succeed, thereby enabling context-related
  1412.      resources to be released.
  1413.  
  1414. 1.2.9: Delegation
  1415.  
  1416.    The GSS-API allows delegation to be controlled by the initiating
  1417.    application via a Boolean parameter to gss_init_sec_context(), the
  1418.    routine that establishes a security context.  Some mechanisms do not
  1419.    support delegation, and for such mechanisms attempts by an
  1420.    application to enable delegation are ignored.
  1421.  
  1422.    The acceptor of a security context for which the initiator enabled
  1423.    delegation will receive (via the delegated_cred_handle parameter of
  1424.    gss_accept_sec_context) a credential handle that contains the
  1425.    delegated identity, and this credential handle may be used to
  1426.    initiate subsequent GSS-API security contexts as an agent or delegate
  1427.    of the initiator.  If the original initiator's identity is "A" and
  1428.    the delegate's identity is "B", then, depending on the underlying
  1429.    mechanism, the identity embodied by the delegated credential may be
  1430.  
  1431.  
  1432.  
  1433. Linn               Document Expiration: 23 March 1998          [Page 24]
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439. Internet-Draft                                         23 September 1997
  1440.  
  1441.  
  1442.    either "A" or "B acting for A".
  1443.  
  1444.    For many mechanisms that support delegation, a simple Boolean does
  1445.    not provide enough control.  Examples of additional aspects of
  1446.    delegation control that a mechanism might provide to an application
  1447.    are duration of delegation, network addresses from which delegation
  1448.    is valid, and constraints on the tasks that may be performed by a
  1449.    delegate.  Such controls are presently outside the scope of the GSS-
  1450.    API.  GSS-API implementations supporting mechanisms offering
  1451.    additional controls should provide extension routines that allow
  1452.    these controls to be exercised (perhaps by modifying the initiator's
  1453.    GSS-API credential prior to its use in establishing a context).
  1454.    However, the simple delegation control provided by GSS-API should
  1455.    always be able to over-ride other mechanism-specific delegation
  1456.    controls - If the application instructs GSS_Init_sec_context() that
  1457.    delegation is not desired, then the implementation must not permit
  1458.    delegation to occur.  This is an exception to the general rule that a
  1459.    mechanism may enable services even if they are not requested -
  1460.    delegation may only be provide at the explicit request of the
  1461.    application.
  1462.  
  1463. 1.2.10: Interprocess Context Transfer
  1464.  
  1465.    GSS-API V2 provides routines (GSS_Export_sec_context() and
  1466.    GSS_Import_sec_context()) which allow a security context to be
  1467.    transferred between processes on a single machine.  The most common
  1468.    use for such a feature is a client-server design where the server is
  1469.    implemented as a single process that accepts incoming security
  1470.    contexts, which then launches child processes to deal with the data
  1471.    on these contexts.  In such a design, the child processes must have
  1472.    access to the security context data structure created within the
  1473.    parent by its call to GSS_Accept_sec_context() so that they can use
  1474.    per-message protection services and delete the security context when
  1475.    the communication session ends.
  1476.  
  1477.    Since the security context data structure is expected to contain
  1478.    sequencing information, it is impractical in general to share a
  1479.    context between processes.  Thus GSS-API provides a call
  1480.    (GSS_Export_sec_context()) that the process which currently owns the
  1481.    context can call to declare that it has no intention to use the
  1482.    context subsequently, and to create an inter-process token containing
  1483.    information needed by the adopting process to successfully import the
  1484.    context.  After successful completion of this call, the original
  1485.    security context is made inaccessible to the calling process by GSS-
  1486.    API, and any context handles referring to this context are no longer
  1487.    valid.  The originating process transfers the inter-process token to
  1488.    the adopting process, which passes it to GSS_Import_sec_context(),
  1489.    and a fresh context handle is created such that it is functionally
  1490.  
  1491.  
  1492.  
  1493. Linn               Document Expiration: 23 March 1998          [Page 25]
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499. Internet-Draft                                         23 September 1997
  1500.  
  1501.  
  1502.    identical to the original context.
  1503.  
  1504.    The inter-process token may contain sensitive data from the original
  1505.    security context (including cryptographic keys).  Applications using
  1506.    inter-process tokens to transfer security contexts must take
  1507.    appropriate steps to protect these tokens in transit.
  1508.    Implementations are not required to support the inter-process
  1509.    transfer of security contexts.  The ability to transfer a security
  1510.    context is indicated when the context is created, by
  1511.    GSS_Init_sec_context() or GSS_Accept_sec_context() indicating a TRUE
  1512.    trans_state return value.
  1513.  
  1514. 2:  Interface Descriptions
  1515.  
  1516.    This section describes the GSS-API's service interface, dividing the
  1517.    set of calls offered into four groups. Credential management calls
  1518.    are related to the acquisition and release of credentials by
  1519.    principals. Context-level calls are related to the management of
  1520.    security contexts between principals. Per-message calls are related
  1521.    to the protection of individual messages on established security
  1522.    contexts. Support calls provide ancillary functions useful to GSS-API
  1523.    callers. Table 2 groups and summarizes the calls in tabular fashion.
  1524.  
  1525.    Table 2:  GSS-API Calls
  1526.  
  1527.    CREDENTIAL MANAGEMENT
  1528.  
  1529.    GSS_Acquire_cred             acquire credentials for use
  1530.    GSS_Release_cred             release credentials after use
  1531.    GSS_Inquire_cred             display information about
  1532.                                 credentials
  1533.    GSS_Add_cred                 construct credentials incrementally
  1534.    GSS_Inquire_cred_by_mech     display per-mechanism credential
  1535.                                 information
  1536.  
  1537.    CONTEXT-LEVEL CALLS
  1538.  
  1539.    GSS_Init_sec_context         initiate outbound security context
  1540.    GSS_Accept_sec_context       accept inbound security context
  1541.    GSS_Delete_sec_context       flush context when no longer needed
  1542.    GSS_Process_context_token    process received control token on
  1543.                                 context
  1544.    GSS_Context_time             indicate validity time remaining on
  1545.                                       context
  1546.    GSS_Inquire_context          display information about context
  1547.    GSS_Wrap_size_limit          determine GSS_Wrap token size limit
  1548.    GSS_Export_sec_context       transfer context to other process
  1549.    GSS_Import_sec_context       import transferred context
  1550.  
  1551.  
  1552.  
  1553. Linn               Document Expiration: 23 March 1998          [Page 26]
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559. Internet-Draft                                         23 September 1997
  1560.  
  1561.  
  1562.    PER-MESSAGE CALLS
  1563.  
  1564.    GSS_GetMIC                   apply integrity check, receive as
  1565.                                 token separate from message
  1566.    GSS_VerifyMIC                validate integrity check token
  1567.                                 along with message
  1568.    GSS_Wrap                     sign, optionally encrypt,
  1569.                                 encapsulate
  1570.    GSS_Unwrap                   decapsulate, decrypt if needed,
  1571.                                 validate integrity check
  1572.  
  1573.    SUPPORT CALLS
  1574.  
  1575.    GSS_Display_status           translate status codes to printable
  1576.                                 form
  1577.    GSS_Indicate_mechs           indicate mech_types supported on
  1578.                                 local system
  1579.    GSS_Compare_name             compare two names for equality
  1580.    GSS_Display_name             translate name to printable form
  1581.    GSS_Import_name              convert printable name to
  1582.                                 normalized form
  1583.    GSS_Release_name             free storage of normalized-form
  1584.                                 name
  1585.    GSS_Release_buffer           free storage of general GSS-allocated object
  1586.    GSS_Release_OID_set          free storage of OID set object
  1587.    GSS_Create_empty_OID_set     create empty OID set
  1588.    GSS_Add_OID_set_member       add member to OID set
  1589.    GSS_Test_OID_set_member      test if OID is member of OID set
  1590.    GSS_Inquire_names_for_mech   indicate name types supported by mechanism
  1591.    GSS_Inquire_mechs_for_name   indicates mechanisms supporting name type
  1592.    GSS_Canonicalize_name        translate name to per-mechanism form
  1593.    GSS_Export_name              externalize per-mechanism name
  1594.    GSS_Duplicate_name           duplicate name object
  1595.  
  1596. 2.1:  Credential management calls
  1597.  
  1598.    These GSS-API calls provide functions related to the management of
  1599.    credentials. Their characterization with regard to whether or not
  1600.    they may block pending exchanges with other network entities (e.g.,
  1601.    directories or authentication servers) depends in part on OS-specific
  1602.    (extra-GSS-API) issues, so is not specified in this document.
  1603.  
  1604.    The GSS_Acquire_cred() call is defined within the GSS-API in support
  1605.    of application portability, with a particular orientation towards
  1606.    support of portable server applications. It is recognized that (for
  1607.    certain systems and mechanisms) credentials for interactive users may
  1608.    be managed differently from credentials for server processes; in such
  1609.    environments, it is the GSS-API implementation's responsibility to
  1610.  
  1611.  
  1612.  
  1613. Linn               Document Expiration: 23 March 1998          [Page 27]
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619. Internet-Draft                                         23 September 1997
  1620.  
  1621.  
  1622.    distinguish these cases and the procedures for making this
  1623.    distinction are a local matter. The GSS_Release_cred()  call provides
  1624.    a means for callers to indicate to the GSS-API that use of a
  1625.    credentials structure is no longer required. The GSS_Inquire_cred()
  1626.    call allows callers to determine information about a credentials
  1627.    structure.  The GSS_Add_cred() call enables callers to append
  1628.    elements to an existing credential structure, allowing iterative
  1629.    construction of a multi-mechanism credential. The
  1630.    GSS_Inquire_cred_by_mech() call enables callers to extract per-
  1631.    mechanism information describing a credentials structure.
  1632.  
  1633. 2.1.1:  GSS_Acquire_cred call
  1634.  
  1635.    Inputs:
  1636.  
  1637.    o  desired_name INTERNAL NAME, -- NULL requests locally-determined
  1638.       default
  1639.  
  1640.    o  lifetime_req INTEGER, -- in seconds; 0 requests default
  1641.  
  1642.    o  desired_mechs SET OF OBJECT IDENTIFIER, -- empty set requests
  1643.       system-selected default
  1644.  
  1645.    o  cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
  1646.       2=ACCEPT-ONLY
  1647.  
  1648.    Outputs:
  1649.  
  1650.    o  major_status INTEGER,
  1651.  
  1652.    o  minor_status INTEGER,
  1653.  
  1654.    o  output_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL,
  1655.            -- caller must release with GSS_Release_cred()
  1656.  
  1657.    o  actual_mechs SET OF OBJECT IDENTIFIER, -- if returned non-NULL,
  1658.            -- caller must release with GSS_Release_oid_set()
  1659.  
  1660.    o  lifetime_rec INTEGER -- in seconds, or reserved value for
  1661.            -- INDEFINITE
  1662.  
  1663.    Return major_status codes:
  1664.  
  1665.    o  GSS_S_COMPLETE indicates that requested credentials were
  1666.       successfully established, for the duration indicated in
  1667.       lifetime_rec, suitable for the usage requested in cred_usage,
  1668.       for the set of mech_types indicated in actual_mechs, and that
  1669.       those credentials can be referenced for subsequent use with
  1670.  
  1671.  
  1672.  
  1673. Linn               Document Expiration: 23 March 1998          [Page 28]
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679. Internet-Draft                                         23 September 1997
  1680.  
  1681.  
  1682.       the handle returned in output_cred_handle.
  1683.  
  1684.    o  GSS_S_BAD_MECH indicates that a mech_type unsupported by the
  1685.       GSS-API implementation type was requested, causing the
  1686.       credential establishment operation to fail.
  1687.  
  1688.    o  GSS_S_BAD_NAMETYPE indicates that the provided desired_name is
  1689.       uninterpretable or of a type unsupported by the applicable
  1690.       underlying GSS-API mechanism(s), so no credentials could be
  1691.       established for the accompanying desired_name.
  1692.  
  1693.    o  GSS_S_BAD_NAME indicates that the provided desired_name is
  1694.       inconsistent in terms of internally-incorporated type specifier
  1695.       information, so no credentials could be established for the
  1696.       accompanying desired_name.
  1697.  
  1698.    o  GSS_S_CREDENTIALS_EXPIRED indicates that underlying credential
  1699.       elements corresponding to the requested desired_name have
  1700.       expired, so requested credentials could not be established.
  1701.  
  1702.    o  GSS_S_NO_CRED indicates that no credential elements corresponding
  1703.       to the requested desired_name and usage could be accessed, so
  1704.       requested credentials could not be established.  In particular,
  1705.       this status should be returned upon temporary user-fixable
  1706.       conditions preventing successful credential establishment.
  1707.  
  1708.    o  GSS_S_FAILURE indicates that credential establishment failed
  1709.       for reasons unspecified at the GSS-API level, including lack
  1710.       of authorization to establish and use credentials associated
  1711.       with the identity named in the input desired_name argument.
  1712.  
  1713.    GSS_Acquire_cred() is used to acquire credentials so that a principal
  1714.    can (as a function of the input cred_usage parameter) initiate and/or
  1715.    accept security contexts under the identity represented by the
  1716.    desired_name input argument. On successful completion, the returned
  1717.    output_cred_handle result provides a handle for subsequent references
  1718.    to the acquired credentials.  Typically, single-user client processes
  1719.    requesting that default credential behavior be applied for context
  1720.    establishment purposes will have no need to invoke this call.
  1721.  
  1722.    A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name,
  1723.    which will be interpreted as a request for a credential handle that
  1724.    will invoke default behavior when passed to GSS_Init_sec_context(),
  1725.    if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or
  1726.    GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or
  1727.    GSS_C_BOTH.  It is possible that multiple pre-established credentials
  1728.    may exist for the same principal identity (for example, as a result
  1729.    of multiple user login sessions) when GSS_Acquire_cred() is called;
  1730.  
  1731.  
  1732.  
  1733. Linn               Document Expiration: 23 March 1998          [Page 29]
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739. Internet-Draft                                         23 September 1997
  1740.  
  1741.  
  1742.    the means used in such cases to select a specific credential are
  1743.    local matters.  The input lifetime_req argument to GSS_Acquire_cred()
  1744.    may provide useful information for local GSS-API implementations to
  1745.    employ in making this disambiguation in a manner which will best
  1746.    satisfy a caller's intent.
  1747.  
  1748.    The lifetime_rec result indicates the length of time for which the
  1749.    acquired credentials will be valid, as an offset from the present. A
  1750.    mechanism may return a reserved value indicating INDEFINITE if no
  1751.    constraints on credential lifetime are imposed.  A caller of
  1752.    GSS_Acquire_cred() can request a length of time for which acquired
  1753.    credentials are to be valid (lifetime_req argument), beginning at the
  1754.    present, or can request credentials with a default validity interval.
  1755.    (Requests for postdated credentials are not supported within the
  1756.    GSS-API.)  Certain mechanisms and implementations may bind in
  1757.    credential validity period specifiers at a point preliminary to
  1758.    invocation of the GSS_Acquire_cred() call (e.g., in conjunction with
  1759.    user login procedures). As a result, callers requesting non-default
  1760.    values for lifetime_req must recognize that such requests cannot
  1761.    always be honored and must be prepared to accommodate the use of
  1762.    returned credentials with different lifetimes as indicated in
  1763.    lifetime_rec.
  1764.  
  1765.    The caller of GSS_Acquire_cred() can explicitly specify a set of
  1766.    mech_types which are to be accommodated in the returned credentials
  1767.    (desired_mechs argument), or can request credentials for a system-
  1768.    defined default set of mech_types. Selection of the system-specified
  1769.    default set is recommended in the interests of application
  1770.    portability. The actual_mechs return value may be interrogated by the
  1771.    caller to determine the set of mechanisms with which the returned
  1772.    credentials may be used.
  1773.  
  1774. 2.1.2:  GSS_Release_cred call
  1775.  
  1776.    Input:
  1777.  
  1778.    o  cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL
  1779.            -- is specified, the call will complete successfully, but
  1780.            -- will have no effect; no credential elements will be
  1781.            -- released.
  1782.  
  1783.    Outputs:
  1784.  
  1785.    o  major_status INTEGER,
  1786.  
  1787.    o  minor_status INTEGER
  1788.  
  1789.    Return major_status codes:
  1790.  
  1791.  
  1792.  
  1793. Linn               Document Expiration: 23 March 1998          [Page 30]
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799. Internet-Draft                                         23 September 1997
  1800.  
  1801.  
  1802.    o  GSS_S_COMPLETE indicates that the credentials referenced by the
  1803.       input cred_handle were released for purposes of subsequent
  1804.       access by the caller. The effect on other processes which may
  1805.       be authorized shared access to such credentials is a local
  1806.       matter.
  1807.  
  1808.    o  GSS_S_NO_CRED indicates that no release operation was
  1809.       performed, either because the input cred_handle was invalid or
  1810.       because the caller lacks authorization to access the
  1811.       referenced credentials.
  1812.  
  1813.    o  GSS_S_FAILURE indicates that the release operation failed for
  1814.       reasons unspecified at the GSS-API level.
  1815.  
  1816.    Provides a means for a caller to explicitly request that credentials
  1817.    be released when their use is no longer required. Note that system-
  1818.    specific credential management functions are also likely to exist,
  1819.    for example to assure that credentials shared among processes are
  1820.    properly deleted when all affected processes terminate, even if no
  1821.    explicit release requests are issued by those processes. Given the
  1822.    fact that multiple callers are not precluded from gaining authorized
  1823.    access to the same credentials, invocation of GSS_Release_cred()
  1824.    cannot be assumed to delete a particular set of credentials on a
  1825.    system-wide basis.
  1826.  
  1827. 2.1.3:  GSS_Inquire_cred call
  1828.  
  1829.    Input:
  1830.  
  1831.    o  cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL
  1832.       specified, default initiator credentials are queried
  1833.  
  1834.    Outputs:
  1835.  
  1836.    o  major_status INTEGER,
  1837.  
  1838.    o  minor_status INTEGER,
  1839.  
  1840.    o  cred_name INTERNAL NAME,  -- caller must release with GSS_Release_name()
  1841.  
  1842.    o  lifetime_rec INTEGER -- in seconds, or reserved value for
  1843.            -- INDEFINITE
  1844.  
  1845.    o  cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
  1846.            -- 2=ACCEPT-ONLY
  1847.  
  1848.    o  mech_set SET OF OBJECT IDENTIFIER  -- caller must release
  1849.            -- with GSS_Release_oid_set()
  1850.  
  1851.  
  1852.  
  1853. Linn               Document Expiration: 23 March 1998          [Page 31]
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859. Internet-Draft                                         23 September 1997
  1860.  
  1861.  
  1862.    Return major_status codes:
  1863.  
  1864.    o  GSS_S_COMPLETE indicates that the credentials referenced by the
  1865.       input cred_handle argument were valid, and that the output
  1866.       cred_name, lifetime_rec, and cred_usage values represent,
  1867.       respectively, the credentials' associated principal name,
  1868.       remaining lifetime, suitable usage modes, and supported
  1869.       mechanism types.
  1870.  
  1871.    o  GSS_S_NO_CRED indicates that no information could be returned
  1872.       about the referenced credentials, either because the input
  1873.       cred_handle was invalid or because the caller lacks
  1874.       authorization to access the referenced credentials.
  1875.  
  1876.    o  GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced credentials
  1877.       are invalid.
  1878.  
  1879.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the referenced credentials
  1880.       have expired.
  1881.  
  1882.    o  GSS_S_FAILURE indicates that the operation failed for
  1883.       reasons unspecified at the GSS-API level.
  1884.  
  1885.    The GSS_Inquire_cred() call is defined primarily for the use of those
  1886.    callers which request use of default credential behavior rather than
  1887.    acquiring credentials explicitly with GSS_Acquire_cred().  It enables
  1888.    callers to determine a credential structure's associated principal
  1889.    name, remaining validity period, usability for security context
  1890.    initiation and/or acceptance, and supported mechanisms.
  1891.  
  1892.    For a multi-mechanism credential, the returned "lifetime" specifier
  1893.    indicates the shortest lifetime of any of the mechanisms' elements in
  1894.    the credential (for either context initiation or acceptance
  1895.    purposes).
  1896.  
  1897.    GSS_Inquire_cred() should indicate INITIATE-AND-ACCEPT for
  1898.    "cred_usage" if both of the following conditions hold:
  1899.  
  1900.         (1) there exists in the credential an element which allows
  1901.         context initiation using some mechanism
  1902.  
  1903.         (2) there exists in the credential an element which allows
  1904.         context acceptance using some mechanism (allowably, but not
  1905.         necessarily, one of the same mechanism(s) qualifying for (1)).
  1906.  
  1907.    If condition (1) holds but not condition (2), GSS_Inquire_cred()
  1908.    should indicate INITIATE-ONLY for "cred_usage".  If condition (2)
  1909.    holds but not condition (1), GSS_Inquire_cred() should indicate
  1910.  
  1911.  
  1912.  
  1913. Linn               Document Expiration: 23 March 1998          [Page 32]
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919. Internet-Draft                                         23 September 1997
  1920.  
  1921.  
  1922.    ACCEPT-ONLY for "cred_usage".
  1923.  
  1924.    Callers requiring finer disambiguation among available combinations
  1925.    of lifetimes, usage modes, and mechanisms should call the
  1926.    GSS_Inquire_cred_by_mech() routine, passing that routine one of the
  1927.    mech OIDs returned by GSS_Inquire_cred().
  1928.  
  1929. 2.1.4:  GSS_Add_cred call
  1930.  
  1931.    Inputs:
  1932.  
  1933.    o  input_cred_handle CREDENTIAL HANDLE -- handle to credential structure
  1934.       created with prior GSS_Acquire_cred() or GSS_Add_cred() call;
  1935.       see text for definition of behavior when GSS_C_NO_CREDENTIAL
  1936.       provided.
  1937.  
  1938.    o  desired_name INTERNAL NAME
  1939.  
  1940.    o  initiator_time_req INTEGER -- in seconds; 0 requests default
  1941.  
  1942.    o  acceptor_time_req INTEGER -- in seconds; 0 requests default
  1943.  
  1944.    o  desired_mech OBJECT IDENTIFIER
  1945.  
  1946.    o  cred_usage INTEGER -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
  1947.            2=ACCEPT-ONLY
  1948.  
  1949.    Outputs:
  1950.  
  1951.    o  major_status INTEGER,
  1952.  
  1953.    o  minor_status INTEGER,
  1954.  
  1955.    o  output_cred_handle CREDENTIAL HANDLE, -- NULL to request that
  1956.            -- credential elements be added "in place" to the credential structure
  1957.            -- identified by input_cred_handle, non-NULL pointer to request that
  1958.            -- a new credential structure and handle be created.
  1959.            -- if credential handle returned, caller must release with
  1960.            -- GSS_Release_cred()
  1961.  
  1962.    o  actual_mechs SET OF OBJECT IDENTIFIER, -- if returned, caller must
  1963.            -- release with GSS_Release_oid_set()
  1964.  
  1965.    o  initiator_time_rec INTEGER -- in seconds, or reserved value for
  1966.       INDEFINITE
  1967.  
  1968.    o  acceptor_time_rec INTEGER -- in seconds, or reserved value for
  1969.       INDEFINITE
  1970.  
  1971.  
  1972.  
  1973. Linn               Document Expiration: 23 March 1998          [Page 33]
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979. Internet-Draft                                         23 September 1997
  1980.  
  1981.  
  1982.    o  cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
  1983.       2=ACCEPT-ONLY
  1984.  
  1985.    o  mech_set SET OF OBJECT IDENTIFIER -- full set of mechanisms
  1986.       supported by resulting credential.
  1987.  
  1988.    Return major_status codes:
  1989.  
  1990.    o  GSS_S_COMPLETE indicates that the credentials referenced by
  1991.       the input_cred_handle argument were valid, and that the
  1992.       resulting credential from GSS_Add_cred() is valid for the
  1993.       durations indicated in initiator_time_rec and acceptor_time_rec,
  1994.       suitable for the usage requested in cred_usage, and for the
  1995.       mechanisms indicated in actual_mechs.
  1996.  
  1997.    o  GSS_S_DUPLICATE_ELEMENT indicates that the input desired_mech
  1998.       specified a mechanism for which the referenced credential
  1999.       already contained a credential element with overlapping cred_usage
  2000.       and validity time specifiers.
  2001.  
  2002.    o  GSS_S_BAD_MECH indicates that the input desired_mech specified
  2003.       a mechanism unsupported by the GSS-API implementation, causing
  2004.       the GSS_Add_cred() operation to fail.
  2005.  
  2006.    o  GSS_S_BAD_NAMETYPE indicates that the provided desired_name
  2007.       is uninterpretable or of a type unsupported by the applicable
  2008.       underlying GSS-API mechanism(s), so the GSS_Add_cred() operation
  2009.       could not be performed for that name.
  2010.  
  2011.    o  GSS_S_BAD_NAME indicates that the provided desired_name is
  2012.       inconsistent in terms of internally-incorporated type specifier
  2013.       information, so the GSS_Add_cred() operation could not be
  2014.       performed for that name.
  2015.  
  2016.    o  GSS_S_NO_CRED indicates that the input_cred_handle referenced
  2017.       invalid or inaccessible credentials. In particular,
  2018.       this status should be returned upon temporary user-fixable
  2019.       conditions preventing successful credential establishment.
  2020.  
  2021.    o  GSS_S_CREDENTIALS_EXPIRED indicates that referenced credential
  2022.       elements have expired, so the GSS_Add_cred() operation could
  2023.       not be performed.
  2024.  
  2025.    o  GSS_S_FAILURE indicates that the operation failed for
  2026.       reasons unspecified at the GSS-API level, including lack of
  2027.       authorization to establish or use credentials representing
  2028.       the requested identity.
  2029.  
  2030.  
  2031.  
  2032.  
  2033. Linn               Document Expiration: 23 March 1998          [Page 34]
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039. Internet-Draft                                         23 September 1997
  2040.  
  2041.  
  2042.    GSS_Add_cred() enables callers to construct credentials iteratively
  2043.    by adding credential elements in successive operations, corresponding
  2044.    to different mechanisms.  This offers particular value in multi-
  2045.    mechanism environments, as the major_status and minor_status values
  2046.    returned on each iteration are individually visible and can therefore
  2047.    be interpreted unambiguously on a per-mechanism basis. A credential
  2048.    element is identified by the name of the principal to which it
  2049.    refers.  GSS-API implementations must impose a local access control
  2050.    policy on callers of this routine to prevent unauthorized callers
  2051.    from acquiring credential elements to which they are not entitled.
  2052.    This routine is not intended to provide a ``login to the network''
  2053.    function, as such a function would involve the creation of new
  2054.    mechanism-specific authentication data, rather than merely acquiring
  2055.    a GSS-API handle to existing data.  Such functions, if required,
  2056.    should be defined in implementation-specific extension routines.
  2057.  
  2058.    If credential acquisition is time-consuming for a mechanism, the
  2059.    mechanism may choose to delay the actual acquisition until the
  2060.    credential is required (e.g. by GSS_Init_sec_context() or
  2061.    GSS_Accept_sec_context()).  Such mechanism-specific implementation
  2062.    decisions should be invisible to the calling application; thus a call
  2063.    of GSS_Inquire_cred() immediately following the call of
  2064.    GSS_Acquire_cred() must return valid credential data, and may
  2065.    therefore incur the overhead of a deferred credential acquisition.
  2066.  
  2067.    If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL
  2068.    output_cred_handle must be supplied.  For the case of
  2069.    GSS_C_NO_CREDENTIAL as input_cred_handle, GSS_Add_cred() will create
  2070.    the credential referenced by its output_cred_handle based on default
  2071.    behavior.  That is, the call will have the same effect as if the
  2072.    caller had previously called GSS_Acquire_cred(), specifying the same
  2073.    usage and passing GSS_C_NO_NAME as the desired_name parameter
  2074.    (thereby obtaining an explicit credential handle corresponding to
  2075.    default behavior), had passed that credential handle to
  2076.    GSS_Add_cred(), and had finally called GSS_Release_cred() on the
  2077.    credential handle received from GSS_Acquire_cred().
  2078.  
  2079.    A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name,
  2080.    which will be interpreted as a request for a credential handle that
  2081.    will invoke default behavior when passed to GSS_Init_sec_context(),
  2082.    if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or
  2083.    GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or
  2084.    GSS_C_BOTH.
  2085.  
  2086.    The same input desired_name, or default reference, should be used on
  2087.    all GSS_Acquire_cred() and GSS_Add_cred() calls corresponding to a
  2088.    particular credential.
  2089.  
  2090.  
  2091.  
  2092.  
  2093. Linn               Document Expiration: 23 March 1998          [Page 35]
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099. Internet-Draft                                         23 September 1997
  2100.  
  2101.  
  2102. 2.1.5:  GSS_Inquire_cred_by_mech call
  2103.  
  2104.    Inputs:
  2105.  
  2106.    o  cred_handle CREDENTIAL HANDLE -- if GSS_C_NO_CREDENTIAL
  2107.       specified, default initiator credentials are queried
  2108.  
  2109.    o  mech_type OBJECT IDENTIFIER  -- specific mechanism for
  2110.       which credentials are being queried
  2111.  
  2112.    Outputs:
  2113.  
  2114.    o  major_status INTEGER,
  2115.  
  2116.    o  minor_status INTEGER,
  2117.  
  2118.    o  cred_name INTERNAL NAME, -- guaranteed to be MN; caller must
  2119.            -- release with GSS_Release_name()
  2120.  
  2121.    o  lifetime_rec_initiate INTEGER -- in seconds, or reserved value for
  2122.            -- INDEFINITE
  2123.  
  2124.    o  lifetime_rec_accept INTEGER -- in seconds, or reserved value for
  2125.            -- INDEFINITE
  2126.  
  2127.    o  cred_usage INTEGER, -- 0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
  2128.            -- 2=ACCEPT-ONLY
  2129.  
  2130.    Return major_status codes:
  2131.  
  2132.    o  GSS_S_COMPLETE indicates that the credentials referenced by the
  2133.       input cred_handle argument were valid, that the mechanism
  2134.       indicated by the input mech_type was represented with elements
  2135.       within those credentials, and that the output cred_name,
  2136.       lifetime_rec_initiate, lifetime_rec_accept, and cred_usage values
  2137.       represent, respectively, the credentials' associated principal
  2138.       name, remaining lifetimes, and suitable usage modes.
  2139.  
  2140.    o  GSS_S_NO_CRED indicates that no information could be returned
  2141.       about the referenced credentials, either because the input
  2142.       cred_handle was invalid or because the caller lacks
  2143.       authorization to access the referenced credentials.
  2144.  
  2145.    o  GSS_S_DEFECTIVE_CREDENTIAL indicates that the referenced credentials
  2146.       are invalid.
  2147.  
  2148.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the referenced credentials
  2149.       have expired.
  2150.  
  2151.  
  2152.  
  2153. Linn               Document Expiration: 23 March 1998          [Page 36]
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159. Internet-Draft                                         23 September 1997
  2160.  
  2161.  
  2162.    o  GSS_S_BAD_MECH indicates that the referenced credentials do not
  2163.       contain elements for the requested mechanism.
  2164.  
  2165.    o  GSS_S_FAILURE indicates that the operation failed for reasons
  2166.       unspecified at the GSS-API level.
  2167.  
  2168.    The GSS_Inquire_cred_by_mech() call enables callers in multi-
  2169.    mechanism environments to acquire specific data about available
  2170.    combinations of lifetimes, usage modes, and mechanisms within a
  2171.    credential structure.  The lifetime_rec_initiate result indicates the
  2172.    available lifetime for context initiation purposes; the
  2173.    lifetime_rec_accept result indicates the available lifetime for
  2174.    context acceptance purposes.
  2175.  
  2176. 2.2:  Context-level calls
  2177.  
  2178.    This group of calls is devoted to the establishment and management of
  2179.    security contexts between peers. A context's initiator calls
  2180.    GSS_Init_sec_context(),  resulting in generation of a token which the
  2181.    caller passes to the target. At the target, that token is passed to
  2182.    GSS_Accept_sec_context().  Depending on the underlying mech_type and
  2183.    specified options, additional token exchanges may be performed in the
  2184.    course of context establishment; such exchanges are accommodated by
  2185.    GSS_S_CONTINUE_NEEDED status returns from GSS_Init_sec_context()  and
  2186.    GSS_Accept_sec_context().
  2187.  
  2188.    Either party to an established context may invoke
  2189.    GSS_Delete_sec_context() to flush context information when a context
  2190.    is no longer required. GSS_Process_context_token()  is used to
  2191.    process received tokens carrying context-level control information.
  2192.    GSS_Context_time()  allows a caller to determine the length of time
  2193.    for which an established context will remain valid.
  2194.    GSS_Inquire_context() returns status information describing context
  2195.    characteristics. GSS_Wrap_size_limit() allows a caller to determine
  2196.    the size of a token which will be generated by a GSS_Wrap()
  2197.    operation.  GSS_Export_sec_context() and GSS_Import_sec_context()
  2198.    enable transfer of active contexts between processes on an end
  2199.    system.
  2200.  
  2201. 2.2.1:  GSS_Init_sec_context call
  2202.  
  2203.    Inputs:
  2204.  
  2205.    o  claimant_cred_handle CREDENTIAL HANDLE, -- NULL specifies "use
  2206.       default"
  2207.  
  2208.    o  input_context_handle CONTEXT HANDLE, -- 0 specifies "none assigned
  2209.       yet"
  2210.  
  2211.  
  2212.  
  2213. Linn               Document Expiration: 23 March 1998          [Page 37]
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219. Internet-Draft                                         23 September 1997
  2220.  
  2221.  
  2222.    o  targ_name INTERNAL NAME,
  2223.  
  2224.    o  mech_type OBJECT IDENTIFIER, -- NULL parameter specifies "use
  2225.       default"
  2226.  
  2227.    o  deleg_req_flag BOOLEAN,
  2228.  
  2229.    o  mutual_req_flag BOOLEAN,
  2230.  
  2231.    o  replay_det_req_flag BOOLEAN,
  2232.  
  2233.    o  sequence_req_flag BOOLEAN,
  2234.  
  2235.    o  anon_req_flag BOOLEAN,
  2236.  
  2237.    o  conf_req_flag BOOLEAN,
  2238.  
  2239.    o  integ_req_flag BOOLEAN,
  2240.  
  2241.    o  lifetime_req INTEGER, -- 0 specifies default lifetime
  2242.  
  2243.    o  chan_bindings OCTET STRING,
  2244.  
  2245.    o  input_token OCTET STRING -- NULL or token received from target
  2246.  
  2247.    Outputs:
  2248.  
  2249.    o  major_status INTEGER,
  2250.  
  2251.    o  minor_status INTEGER,
  2252.  
  2253.    o  output_context_handle CONTEXT HANDLE,  -- once returned non-NULL,
  2254.            -- caller must release with GSS_Delete_sec_context()
  2255.  
  2256.    o  mech_type OBJECT IDENTIFIER, -- actual mechanism always
  2257.            -- indicated, never NULL; caller should treat as read-only
  2258.            -- and should not attempt to release
  2259.  
  2260.    o  output_token OCTET STRING, -- NULL or token to pass to context
  2261.            -- target; caller must release with GSS_Release_buffer()
  2262.  
  2263.    o  deleg_state BOOLEAN,
  2264.  
  2265.    o  mutual_state BOOLEAN,
  2266.  
  2267.    o  replay_det_state BOOLEAN,
  2268.  
  2269.    o  sequence_state BOOLEAN,
  2270.  
  2271.  
  2272.  
  2273. Linn               Document Expiration: 23 March 1998          [Page 38]
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279. Internet-Draft                                         23 September 1997
  2280.  
  2281.  
  2282.    o  anon_state BOOLEAN,
  2283.  
  2284.    o  trans_state BOOLEAN,
  2285.  
  2286.    o  prot_ready_state BOOLEAN, -- see Section 1.2.7
  2287.  
  2288.    o  conf_avail BOOLEAN,
  2289.  
  2290.    o  integ_avail BOOLEAN,
  2291.  
  2292.    o  lifetime_rec INTEGER -- in seconds, or reserved value for
  2293.       INDEFINITE
  2294.  
  2295.    This call may block pending network interactions for those mech_types
  2296.    in which an authentication server or other network entity must be
  2297.    consulted on behalf of a context initiator in order to generate an
  2298.    output_token suitable for presentation to a specified target.
  2299.  
  2300.    Return major_status codes:
  2301.  
  2302.    o  GSS_S_COMPLETE indicates that context-level information was
  2303.       successfully initialized, and that the returned output_token
  2304.       will provide sufficient information for the target to perform
  2305.       per-message processing on the newly-established context.
  2306.  
  2307.    o  GSS_S_CONTINUE_NEEDED indicates that control information in the
  2308.       returned output_token must be sent to the target, and that a
  2309.       reply must be received and passed as the input_token argument
  2310.       to a continuation call to GSS_Init_sec_context(),  before
  2311.       per-message processing can be performed in conjunction with
  2312.       this context.
  2313.  
  2314.    o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks
  2315.       performed on the input_token failed, preventing further
  2316.       processing from being performed based on that token.
  2317.  
  2318.    o  GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks
  2319.       performed on the credential structure referenced by
  2320.       claimant_cred_handle failed, preventing further processing from
  2321.       being performed using that credential structure.
  2322.  
  2323.    o  GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received
  2324.       input_token contains an incorrect integrity check, so
  2325.       context setup cannot be accomplished.
  2326.  
  2327.    o  GSS_S_NO_CRED indicates that no context was established,
  2328.       either because the input cred_handle was invalid, because the
  2329.       referenced credentials are valid for context acceptor use
  2330.  
  2331.  
  2332.  
  2333. Linn               Document Expiration: 23 March 1998          [Page 39]
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339. Internet-Draft                                         23 September 1997
  2340.  
  2341.  
  2342.       only, because the caller lacks authorization to access the
  2343.       referenced credentials, or because the resolution of default
  2344.       credentials failed.
  2345.  
  2346.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the credentials
  2347.       provided through the input claimant_cred_handle argument are no
  2348.       longer valid, so context establishment cannot be completed.
  2349.  
  2350.    o  GSS_S_BAD_BINDINGS indicates that a mismatch between the
  2351.       caller-provided chan_bindings and those extracted from the
  2352.       input_token was detected, signifying a security-relevant
  2353.       event and preventing context establishment. (This result will
  2354.       be returned by GSS_Init_sec_context only for contexts where
  2355.       mutual_state is TRUE.)
  2356.  
  2357.    o  GSS_S_OLD_TOKEN indicates that the input_token is too old to
  2358.       be checked for integrity. This is a fatal error during context
  2359.       establishment.
  2360.  
  2361.    o  GSS_S_DUPLICATE_TOKEN indicates that the input token has a
  2362.       correct integrity check, but is a duplicate of a token already
  2363.       processed. This is a fatal error during context establishment.
  2364.  
  2365.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  2366.       for the input context_handle provided; this major status will
  2367.       be returned only for successor calls following GSS_S_CONTINUE_
  2368.       NEEDED status returns.
  2369.  
  2370.    o  GSS_S_BAD_NAMETYPE indicates that the provided targ_name is
  2371.       of a type uninterpretable or unsupported by the applicable
  2372.       underlying GSS-API mechanism(s), so context establishment
  2373.       cannot be completed.
  2374.  
  2375.    o  GSS_S_BAD_NAME indicates that the provided targ_name is
  2376.       inconsistent in terms of internally-incorporated type specifier
  2377.       information, so context establishment cannot be accomplished.
  2378.  
  2379.    o  GSS_S_BAD_MECH indicates receipt of a context establishment token
  2380.       or of a caller request specifying a mechanism unsupported by
  2381.       the local system or with the caller's active credentials
  2382.  
  2383.    o  GSS_S_FAILURE indicates that context setup could not be
  2384.       accomplished for reasons unspecified at the GSS-API level, and
  2385.       that no interface-defined recovery action is available.
  2386.  
  2387.    This routine is used by a context initiator, and ordinarily emits one
  2388.    (or, for the case of a multi-step exchange, more than one)
  2389.    output_token suitable for use by the target within the selected
  2390.  
  2391.  
  2392.  
  2393. Linn               Document Expiration: 23 March 1998          [Page 40]
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399. Internet-Draft                                         23 September 1997
  2400.  
  2401.  
  2402.    mech_type's protocol. Using information in the credentials structure
  2403.    referenced by claimant_cred_handle, GSS_Init_sec_context()
  2404.    initializes the data structures required to establish a security
  2405.    context with target targ_name. The targ_name may be any valid
  2406.    INTERNAL NAME; it need not be an MN. The claimant_cred_handle must
  2407.    correspond to the same valid credentials structure on the initial
  2408.    call to GSS_Init_sec_context()  and on any successor calls resulting
  2409.    from GSS_S_CONTINUE_NEEDED status returns; different protocol
  2410.    sequences modeled by the GSS_S_CONTINUE_NEEDED facility will require
  2411.    access to credentials at different points in the context
  2412.    establishment sequence.
  2413.  
  2414.    The input_context_handle argument is 0, specifying "not yet
  2415.    assigned", on the first GSS_Init_sec_context()  call relating to a
  2416.    given context. If successful (i.e., if accompanied by major_status
  2417.    GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if successful, the
  2418.    initial GSS_Init_sec_context() call returns a non-zero
  2419.    output_context_handle for use in future references to this context.
  2420.    Once a non-zero output_context_handle has been returned, GSS-API
  2421.    callers should call GSS_Delete_sec_context() to release context-
  2422.    related resources if errors occur in later phases of context
  2423.    establishment, or when an established context is no longer required.
  2424.  
  2425.    When continuation attempts to GSS_Init_sec_context() are needed to
  2426.    perform context establishment, the previously-returned non-zero
  2427.    handle value is entered into the input_context_handle argument and
  2428.    will be echoed in the returned output_context_handle argument. On
  2429.    such continuation attempts (and only on continuation attempts) the
  2430.    input_token value is used, to provide the token returned from the
  2431.    context's target.
  2432.  
  2433.    The chan_bindings argument is used by the caller to provide
  2434.    information binding the security context to security-related
  2435.    characteristics (e.g., addresses, cryptographic keys) of the
  2436.    underlying communications channel. See Section 1.1.6 of this document
  2437.    for more discussion of this argument's usage.
  2438.  
  2439.    The input_token argument contains a message received from the target,
  2440.    and is significant only on a call to GSS_Init_sec_context()  which
  2441.    follows a previous return indicating GSS_S_CONTINUE_NEEDED
  2442.    major_status.
  2443.  
  2444.    It is the caller's responsibility to establish a communications path
  2445.    to the target, and to transmit any returned output_token (independent
  2446.    of the accompanying returned major_status value) to the target over
  2447.    that path. The output_token can, however, be transmitted along with
  2448.    the first application-provided input message to be processed by
  2449.    GSS_GetMIC() or GSS_Wrap() in conjunction with a successfully-
  2450.  
  2451.  
  2452.  
  2453. Linn               Document Expiration: 23 March 1998          [Page 41]
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459. Internet-Draft                                         23 September 1997
  2460.  
  2461.  
  2462.    established context.
  2463.  
  2464.    The initiator may request various context-level functions through
  2465.    input flags: the deleg_req_flag requests delegation of access rights,
  2466.    the mutual_req_flag requests mutual authentication, the
  2467.    replay_det_req_flag requests that replay detection features be
  2468.    applied to messages transferred on the established context, and the
  2469.    sequence_req_flag requests that sequencing be enforced. (See Section
  2470.    1.2.3 for more information on replay detection and sequencing
  2471.    features.)  The anon_req_flag requests that the initiator's identity
  2472.    not be transferred within tokens to be sent to the acceptor. The
  2473.    conf_req_flag and integ_req_flag provide informatory inputs to the
  2474.    GSS-API implementation as to whether, respectively, per-message
  2475.    confidentiality and per-message integrity services will be required
  2476.    on the context.
  2477.  
  2478.    Not all of the optionally-requestable features will be available in
  2479.    all underlying mech_types. The corresponding return state values
  2480.    deleg_state, mutual_state, replay_det_state, and sequence_state
  2481.    indicate, as a function of mech_type processing capabilities and
  2482.    initiator-provided input flags, the set of features which will be
  2483.    active on the context.  The returned trans_state value indicates
  2484.    whether the context is transferable to other processes through use of
  2485.    GSS_Export_sec_context().  These state indicators' values are
  2486.    undefined unless either the routine's major_status indicates
  2487.    GSS_S_COMPLETE, or TRUE prot_ready_state is returned along with
  2488.    GSS_S_CONTINUE_NEEDED major_status; for the latter case, it is
  2489.    possible that additional features, not confirmed or indicated along
  2490.    with TRUE prot_ready_state, will be confirmed and indicated when
  2491.    GSS_S_COMPLETE is subsequently returned.
  2492.  
  2493.    The returned anon_state and prot_ready_state values are significant
  2494.    for both GSS_S_COMPLETE and GSS_S_CONTINUE_NEEDED major_status
  2495.    returns from GSS_Init_sec_context().  When anon_state is returned
  2496.    TRUE, this indicates that neither the current token nor its
  2497.    predecessors delivers or has delivered the initiator's identity.
  2498.    Callers wishing to perform context establishment only if anonymity
  2499.    support is provided should transfer a returned token from
  2500.    GSS_Init_sec_context() to the peer only if it is accompanied by a
  2501.    TRUE anon_state indicator.  When prot_ready_state is returned TRUE in
  2502.    conjunction with GSS_S_CONTINUE_NEEDED major_status, this indicates
  2503.    that per-message protection operations may be applied on the context:
  2504.    see Section 1.2.7 for further discussion of this facility.
  2505.  
  2506.    Failure to provide the precise set of features requested by the
  2507.    caller does not cause context establishment to fail; it is the
  2508.    caller's prerogative to delete the context if the feature set
  2509.    provided is unsuitable for the caller's use.
  2510.  
  2511.  
  2512.  
  2513. Linn               Document Expiration: 23 March 1998          [Page 42]
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519. Internet-Draft                                         23 September 1997
  2520.  
  2521.  
  2522.    The returned mech_type value indicates the specific mechanism
  2523.    employed on the context; it will never indicate the value for
  2524.    "default".  A valid mech_type result must be returned along with a
  2525.    GSS_S_COMPLETE status return; GSS-API implementations may (but are
  2526.    not required to) also return mech_type along with predecessor calls
  2527.    indicating GSS_S_CONTINUE_NEEDED status. For the case of mechanisms
  2528.    which themselves perform negotiation, the returned mech_type result
  2529.    may indicate selection of a mechanism identified by an OID different
  2530.    than that passed in the input mech_type argument, and the returned
  2531.    value may change between successive calls returning
  2532.    GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE.
  2533.  
  2534.    The conf_avail return value indicates whether the context supports
  2535.    per-message confidentiality services, and so informs the caller
  2536.    whether or not a request for encryption through the conf_req_flag
  2537.    input to GSS_Wrap() can be honored. In similar fashion, the
  2538.    integ_avail return value indicates whether per-message integrity
  2539.    services are available (through either GSS_GetMIC() or GSS_Wrap()) on
  2540.    the established context. These state indicators' values are undefined
  2541.    unless either the routine's major_status indicates GSS_S_COMPLETE, or
  2542.    TRUE prot_ready_state is returned along with GSS_S_CONTINUE_NEEDED
  2543.    major_status.
  2544.  
  2545.    The lifetime_req input specifies a desired upper bound for the
  2546.    lifetime of the context to be established, with a value of 0 used to
  2547.    request a default lifetime. The lifetime_rec return value indicates
  2548.    the length of time for which the context will be valid, expressed as
  2549.    an offset from the present; depending on mechanism capabilities,
  2550.    credential lifetimes, and local policy, it may not correspond to the
  2551.    value requested in lifetime_req.  If no constraints on context
  2552.    lifetime are imposed, this may be indicated by returning a reserved
  2553.    value representing INDEFINITE lifetime_req. The value of lifetime_rec
  2554.    is undefined unless the routine's major_status indicates
  2555.    GSS_S_COMPLETE.
  2556.  
  2557.    If the mutual_state is TRUE, this fact will be reflected within the
  2558.    output_token. A call to GSS_Accept_sec_context()  at the target in
  2559.    conjunction with such a context will return a token, to be processed
  2560.    by a continuation call to GSS_Init_sec_context(),  in order to
  2561.    achieve mutual authentication.
  2562.  
  2563. 2.2.2:  GSS_Accept_sec_context call
  2564.  
  2565.    Inputs:
  2566.  
  2567.    o  acceptor_cred_handle CREDENTIAL HANDLE, -- NULL specifies
  2568.       "use default"
  2569.  
  2570.  
  2571.  
  2572.  
  2573. Linn               Document Expiration: 23 March 1998          [Page 43]
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579. Internet-Draft                                         23 September 1997
  2580.  
  2581.  
  2582.    o  input_context_handle CONTEXT HANDLE, -- 0 specifies
  2583.       "not yet assigned"
  2584.  
  2585.    o  chan_bindings OCTET STRING,
  2586.  
  2587.    o  input_token OCTET STRING
  2588.  
  2589.    Outputs:
  2590.  
  2591.    o  major_status INTEGER,
  2592.  
  2593.    o  minor_status INTEGER,
  2594.  
  2595.    o  src_name INTERNAL NAME, -- guaranteed to be MN
  2596.            -- once returned, caller must release with GSS_Release_name()
  2597.  
  2598.    o  mech_type OBJECT IDENTIFIER, -- caller should treat as
  2599.            -- read-only; does not need to be released
  2600.  
  2601.    o  output_context_handle CONTEXT HANDLE, -- once returned
  2602.            -- non-NULL in context establishment sequence, caller
  2603.            -- must release with GSS_Delete_sec_context()
  2604.  
  2605.    o  deleg_state BOOLEAN,
  2606.  
  2607.    o  mutual_state BOOLEAN,
  2608.  
  2609.    o  replay_det_state BOOLEAN,
  2610.  
  2611.    o  sequence_state BOOLEAN,
  2612.  
  2613.    o  anon_state BOOLEAN,
  2614.  
  2615.    o  trans_state BOOLEAN,
  2616.  
  2617.    o  prot_ready_state BOOLEAN, -- see Section 1.2.7 for discussion
  2618.  
  2619.    o  conf_avail BOOLEAN,
  2620.  
  2621.    o  integ_avail BOOLEAN,
  2622.  
  2623.    o  lifetime_rec INTEGER, -- in seconds, or reserved value for
  2624.       INDEFINITE
  2625.  
  2626.    o  delegated_cred_handle CREDENTIAL HANDLE, -- if returned non-NULL,
  2627.            -- caller must release with GSS_Release_cred()
  2628.  
  2629.    o  output_token OCTET STRING -- NULL or token to pass to context
  2630.  
  2631.  
  2632.  
  2633. Linn               Document Expiration: 23 March 1998          [Page 44]
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639. Internet-Draft                                         23 September 1997
  2640.  
  2641.  
  2642.            -- initiator; if returned non-NULL, caller must release with
  2643.            -- GSS_Release_buffer()
  2644.  
  2645.    This call may block pending network interactions for those mech_types
  2646.    in which a directory service or other network entity must be
  2647.    consulted on behalf of a context acceptor in order to validate a
  2648.    received input_token.
  2649.  
  2650.    Return major_status codes:
  2651.  
  2652.    o  GSS_S_COMPLETE indicates that context-level data structures
  2653.       were successfully initialized, and that per-message processing
  2654.       can now be performed in conjunction with this context.
  2655.  
  2656.    o  GSS_S_CONTINUE_NEEDED indicates that control information in the
  2657.       returned output_token must be sent to the initiator, and that
  2658.       a response must be received and passed as the input_token
  2659.       argument to a continuation call to GSS_Accept_sec_context(),
  2660.       before per-message processing can be performed in conjunction
  2661.       with this context.
  2662.  
  2663.    o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed
  2664.       on the input_token failed, preventing further processing from
  2665.       being performed based on that token.
  2666.  
  2667.    o  GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks
  2668.       performed on the credential structure referenced by
  2669.       acceptor_cred_handle failed, preventing further processing from being
  2670.       performed using that credential structure.
  2671.  
  2672.    o  GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received
  2673.       input_token contains an incorrect integrity check, so context setup
  2674.       cannot be accomplished.
  2675.  
  2676.    o  GSS_S_DUPLICATE_TOKEN indicates that the integrity check on the
  2677.       received input_token was correct, but that the input_token
  2678.       was recognized as a duplicate of an input_token already
  2679.       processed. No new context is established.
  2680.  
  2681.    o  GSS_S_OLD_TOKEN indicates that the integrity check on the received
  2682.       input_token was correct, but that the input_token is too old
  2683.       to be checked for duplication against previously-processed
  2684.       input_tokens. No new context is established.
  2685.  
  2686.    o  GSS_S_NO_CRED indicates that no context was established, either
  2687.       because the input cred_handle was invalid, because the
  2688.       referenced credentials are valid for context initiator use
  2689.       only, because the caller lacks authorization to access the
  2690.  
  2691.  
  2692.  
  2693. Linn               Document Expiration: 23 March 1998          [Page 45]
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699. Internet-Draft                                         23 September 1997
  2700.  
  2701.  
  2702.       referenced credentials, or because the procedure for default
  2703.       credential resolution failed.
  2704.  
  2705.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the credentials provided
  2706.       through the input acceptor_cred_handle argument are no
  2707.       longer valid, so context establishment cannot be completed.
  2708.  
  2709.    o  GSS_S_BAD_BINDINGS indicates that a mismatch between the
  2710.       caller-provided chan_bindings and those extracted from the
  2711.       input_token was detected, signifying a security-relevant
  2712.       event and preventing context establishment.
  2713.  
  2714.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  2715.       for the input context_handle provided; this major status will
  2716.       be returned only for successor calls following GSS_S_CONTINUE_
  2717.       NEEDED status returns.
  2718.  
  2719.    o  GSS_S_BAD_MECH indicates receipt of a context establishment token
  2720.       specifying a mechanism unsupported by the local system or with
  2721.       the caller's active credentials.
  2722.  
  2723.    o  GSS_S_FAILURE indicates that context setup could not be accomplished
  2724.       for reasons unspecified at the GSS-API level, and
  2725.       that no interface-defined recovery action is available.
  2726.  
  2727.    The GSS_Accept_sec_context()  routine is used by a context target.
  2728.    Using information in the credentials structure referenced by the
  2729.    input acceptor_cred_handle, it verifies the incoming input_token and
  2730.    (following the successful completion of a context establishment
  2731.    sequence) returns the authenticated src_name and the mech_type used.
  2732.    The returned src_name is guaranteed to be an MN, processed by the
  2733.    mechanism under which the context was established. The
  2734.    acceptor_cred_handle must correspond to the same valid credentials
  2735.    structure on the initial call to GSS_Accept_sec_context() and on any
  2736.    successor calls resulting from GSS_S_CONTINUE_NEEDED status returns;
  2737.    different protocol sequences modeled by the GSS_S_CONTINUE_NEEDED
  2738.    mechanism will require access to credentials at different points in
  2739.    the context establishment sequence.
  2740.  
  2741.    The input_context_handle argument is 0, specifying "not yet
  2742.    assigned", on the first GSS_Accept_sec_context()  call relating to a
  2743.    given context.  If successful (i.e., if accompanied by major_status
  2744.    GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED), and only if successful, the
  2745.    initial GSS_Accept_sec_context() call returns a non-zero
  2746.    output_context_handle for use in future references to this context.
  2747.    Once a non-zero output_context_handle has been returned, GSS-API
  2748.    callers should call GSS_Delete_sec_context() to release context-
  2749.    related resources if errors occur in later phases of context
  2750.  
  2751.  
  2752.  
  2753. Linn               Document Expiration: 23 March 1998          [Page 46]
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759. Internet-Draft                                         23 September 1997
  2760.  
  2761.  
  2762.    establishment, or when an established context is no longer required.
  2763.  
  2764.    The chan_bindings argument is used by the caller to provide
  2765.    information binding the security context to security-related
  2766.    characteristics (e.g., addresses, cryptographic keys) of the
  2767.    underlying communications channel. See Section 1.1.6 of this document
  2768.    for more discussion of this argument's usage.
  2769.  
  2770.    The returned state results (deleg_state, mutual_state,
  2771.    replay_det_state, sequence_state, anon_state, trans_state, and
  2772.    prot_ready_state) reflect the same information as described for
  2773.    GSS_Init_sec_context(), and their values are significant under the
  2774.    same return state conditions.
  2775.  
  2776.    The conf_avail return value indicates whether the context supports
  2777.    per-message confidentiality services, and so informs the caller
  2778.    whether or not a request for encryption through the conf_req_flag
  2779.    input to GSS_Wrap() can be honored. In similar fashion, the
  2780.    integ_avail return value indicates whether per-message integrity
  2781.    services are available (through either GSS_GetMIC()  or GSS_Wrap())
  2782.    on the established context.  These values are significant under the
  2783.    same return state conditions as described under
  2784.    GSS_Init_sec_context().
  2785.  
  2786.    The lifetime_rec return value is significant only in conjunction with
  2787.    GSS_S_COMPLETE major_status, and indicates the length of time for
  2788.    which the context will be valid, expressed as an offset from the
  2789.    present.
  2790.  
  2791.    The returned mech_type value indicates the specific mechanism
  2792.    employed on the context; it will never indicate the value for
  2793.    "default".  A valid mech_type result must be returned whenever
  2794.    GSS_S_COMPLETE status is indicated; GSS-API implementations may (but
  2795.    are not required to) also return mech_type along with predecessor
  2796.    calls indicating GSS_S_CONTINUE_NEEDED status. For the case of
  2797.    mechanisms which themselves perform negotiation, the returned
  2798.    mech_type result may indicate selection of a mechanism identified by
  2799.    an OID different than that passed in the input mech_type argument,
  2800.    and the returned value may change between successive calls returning
  2801.    GSS_S_CONTINUE_NEEDED and the final call returning GSS_S_COMPLETE.
  2802.  
  2803.    The delegated_cred_handle result is significant only when deleg_state
  2804.    is TRUE, and provides a means for the target to reference the
  2805.    delegated credentials. The output_token result, when non-NULL,
  2806.    provides a context-level token to be returned to the context
  2807.    initiator to continue a multi-step context establishment sequence. As
  2808.    noted with GSS_Init_sec_context(),  any returned token should be
  2809.    transferred to the context's peer (in this case, the context
  2810.  
  2811.  
  2812.  
  2813. Linn               Document Expiration: 23 March 1998          [Page 47]
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819. Internet-Draft                                         23 September 1997
  2820.  
  2821.  
  2822.    initiator), independent of the value of the accompanying returned
  2823.    major_status.
  2824.  
  2825.    Note: A target must be able to distinguish a context-level
  2826.    input_token, which is passed to GSS_Accept_sec_context(),  from the
  2827.    per-message data elements passed to GSS_VerifyMIC()  or GSS_Unwrap().
  2828.    These data elements may arrive in a single application message, and
  2829.    GSS_Accept_sec_context()  must be performed before per-message
  2830.    processing can be performed successfully.
  2831.  
  2832. 2.2.3: GSS_Delete_sec_context call
  2833.  
  2834.    Input:
  2835.  
  2836.    o  context_handle CONTEXT HANDLE
  2837.  
  2838.    Outputs:
  2839.  
  2840.    o  major_status INTEGER,
  2841.  
  2842.    o  minor_status INTEGER,
  2843.  
  2844.    o  output_context_token OCTET STRING
  2845.  
  2846.    Return major_status codes:
  2847.  
  2848.    o  GSS_S_COMPLETE indicates that the context was recognized, and that
  2849.       relevant context-specific information was flushed.  If the caller
  2850.       provides a non-null buffer to receive an output_context_token, and
  2851.       the mechanism returns a non-NULL token into that buffer, the
  2852.       returned output_context_token is ready for transfer to the context's
  2853.       peer.
  2854.  
  2855.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  2856.       for the input context_handle provided, so no deletion was
  2857.       performed.
  2858.  
  2859.    o  GSS_S_FAILURE indicates that the context is recognized, but
  2860.       that the GSS_Delete_sec_context()  operation could not be
  2861.       performed for reasons unspecified at the GSS-API level.
  2862.  
  2863.    This call can be made by either peer in a security context, to flush
  2864.    context-specific information. Once a non-zero output_context_handle
  2865.    has been returned by context establishment calls, GSS-API callers
  2866.    should call GSS_Delete_sec_context() to release context-related
  2867.    resources if errors occur in later phases of context establishment,
  2868.    or when an established context is no longer required.  This call may
  2869.    block pending network interactions for mech_types in which active
  2870.  
  2871.  
  2872.  
  2873. Linn               Document Expiration: 23 March 1998          [Page 48]
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879. Internet-Draft                                         23 September 1997
  2880.  
  2881.  
  2882.    notification must be made to a central server when a security context
  2883.    is to be deleted.
  2884.  
  2885.    If a non-null output_context_token parameter is provided by the
  2886.    caller, an output_context_token may be returned to the caller.  If an
  2887.    output_context_token is provided to the caller, it can be passed to
  2888.    the context's peer to inform the peer's GSS-API implementation that
  2889.    the peer's corresponding context information can also be flushed.
  2890.    (Once a context is established, the peers involved are expected to
  2891.    retain cached credential and context-related information until the
  2892.    information's expiration time is reached or until a
  2893.    GSS_Delete_sec_context() call is made.)
  2894.  
  2895.    The facility for context_token usage to signal context deletion is
  2896.    retained for compatibility with GSS-API Version 1.  For current
  2897.    usage, it is recommended that both peers to a context invoke
  2898.    GSS_Delete_sec_context() independently, passing a null
  2899.    output_context_token buffer to indicate that no context_token is
  2900.    required.  Implementations of GSS_Delete_sec_context() should delete
  2901.    relevant locally-stored context information.
  2902.  
  2903.    Attempts to perform per-message processing on a deleted context will
  2904.    result in error returns.
  2905.  
  2906. 2.2.4:  GSS_Process_context_token call
  2907.  
  2908.    Inputs:
  2909.  
  2910.    o  context_handle CONTEXT HANDLE,
  2911.  
  2912.    o  input_context_token OCTET STRING
  2913.  
  2914.    Outputs:
  2915.  
  2916.    o  major_status INTEGER,
  2917.  
  2918.    o  minor_status INTEGER,
  2919.  
  2920.    Return major_status codes:
  2921.  
  2922.    o  GSS_S_COMPLETE indicates that the input_context_token was
  2923.       successfully processed in conjunction with the context
  2924.       referenced by context_handle.
  2925.  
  2926.    o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks
  2927.       performed on the received context_token failed, preventing
  2928.       further processing from being performed with that token.
  2929.  
  2930.  
  2931.  
  2932.  
  2933. Linn               Document Expiration: 23 March 1998          [Page 49]
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939. Internet-Draft                                         23 September 1997
  2940.  
  2941.  
  2942.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  2943.       for the input context_handle provided.
  2944.  
  2945.    o  GSS_S_FAILURE indicates that the context is recognized, but
  2946.       that the GSS_Process_context_token()  operation could not be
  2947.       performed for reasons unspecified at the GSS-API level.
  2948.  
  2949.    This call is used to process context_tokens received from a peer once
  2950.    a context has been established, with corresponding impact on
  2951.    context-level state information. One use for this facility is
  2952.    processing of the context_tokens generated by
  2953.    GSS_Delete_sec_context();  GSS_Process_context_token() will not block
  2954.    pending network interactions for that purpose. Another use is to
  2955.    process tokens indicating remote-peer context establishment failures
  2956.    after the point where the local GSS-API implementation has already
  2957.    indicated GSS_S_COMPLETE status.
  2958.  
  2959. 2.2.5:  GSS_Context_time call
  2960.  
  2961.    Input:
  2962.  
  2963.    o  context_handle CONTEXT HANDLE,
  2964.  
  2965.    Outputs:
  2966.  
  2967.    o  major_status INTEGER,
  2968.  
  2969.    o  minor_status INTEGER,
  2970.  
  2971.    o  lifetime_rec INTEGER -- in seconds, or reserved value for
  2972.       INDEFINITE
  2973.  
  2974.    Return major_status codes:
  2975.  
  2976.    o  GSS_S_COMPLETE indicates that the referenced context is valid,
  2977.       and will remain valid for the amount of time indicated in
  2978.       lifetime_rec.
  2979.  
  2980.    o  GSS_S_CONTEXT_EXPIRED indicates that data items related to the
  2981.       referenced context have expired.
  2982.  
  2983.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the context is recognized,
  2984.       but that its associated credentials have expired.  Return of this
  2985.       status by GSS_Context_time() is deprecated.
  2986.  
  2987.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  2988.       for the input context_handle provided.
  2989.  
  2990.  
  2991.  
  2992.  
  2993. Linn               Document Expiration: 23 March 1998          [Page 50]
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999. Internet-Draft                                         23 September 1997
  3000.  
  3001.  
  3002.    o  GSS_S_FAILURE indicates that the requested operation failed for
  3003.       reasons unspecified at the GSS-API level.
  3004.  
  3005.    This call is used to determine the amount of time for which a
  3006.    currently established context will remain valid.
  3007.  
  3008. 2.2.6:   GSS_Inquire_context call
  3009.  
  3010.    Input:
  3011.  
  3012.    o  context_handle CONTEXT HANDLE,
  3013.  
  3014.    Outputs:
  3015.  
  3016.    o  major_status INTEGER,
  3017.  
  3018.    o  minor_status INTEGER,
  3019.  
  3020.    o  src_name INTERNAL NAME,  -- name of context initiator,
  3021.            -- guaranteed to be MN; caller must release with GSS_Release_name()
  3022.  
  3023.    o  targ_name INTERNAL NAME,  -- name of context target,
  3024.            -- guaranteed to be MN; caller must release with GSS_Release_name()
  3025.  
  3026.    o  lifetime_rec INTEGER -- in seconds, or reserved value for
  3027.            -- INDEFINITE,
  3028.  
  3029.    o  mech_type OBJECT IDENTIFIER, -- the mechanism supporting this
  3030.            -- security context; caller should treat as read-only and not
  3031.            -- attempt to release
  3032.  
  3033.    o  deleg_state BOOLEAN,
  3034.  
  3035.    o  mutual_state BOOLEAN,
  3036.  
  3037.    o  replay_det_state BOOLEAN,
  3038.  
  3039.    o  sequence_state BOOLEAN,
  3040.  
  3041.    o  anon_state BOOLEAN,
  3042.  
  3043.    o  trans_state BOOLEAN,
  3044.  
  3045.    o  prot_ready_state BOOLEAN,
  3046.  
  3047.    o  conf_avail BOOLEAN,
  3048.  
  3049.    o  integ_avail BOOLEAN,
  3050.  
  3051.  
  3052.  
  3053. Linn               Document Expiration: 23 March 1998          [Page 51]
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059. Internet-Draft                                         23 September 1997
  3060.  
  3061.  
  3062.    o  locally_initiated BOOLEAN, -- TRUE if initiator, FALSE if acceptor
  3063.  
  3064.    Return major_status codes:
  3065.  
  3066.    o  GSS_S_COMPLETE indicates that the referenced context is valid
  3067.       and that src_name, targ_name, lifetime_rec, mech_type, deleg_state,
  3068.       mutual_state, replay_det_state, sequence_state, anon_state,
  3069.       trans_state, prot_ready_state, conf_avail, integ_avail, and
  3070.       locally_initiated return values describe the corresponding
  3071.       characteristics of the context.
  3072.  
  3073.    o  GSS_S_CONTEXT_EXPIRED indicates that the provided input context_handle
  3074.       is recognized, but that the referenced context has expired.  Return
  3075.       values other than major_status and minor_status are undefined.
  3076.  
  3077.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3078.       for the input context_handle provided. Return values other than
  3079.       major_status and minor_status are undefined.
  3080.  
  3081.    o  GSS_S_FAILURE indicates that the requested operation failed for
  3082.       reasons unspecified at the GSS-API level. Return values other than
  3083.       major_status and minor_status are undefined.
  3084.  
  3085.    This call is used to extract information describing characteristics
  3086.    of a security context.
  3087.  
  3088. 2.2.7:   GSS_Wrap_size_limit call
  3089.  
  3090.    Inputs:
  3091.  
  3092.    o  context_handle CONTEXT HANDLE,
  3093.  
  3094.    o  qop INTEGER,
  3095.  
  3096.    o  output_size INTEGER
  3097.  
  3098.    Outputs:
  3099.  
  3100.    o  major_status INTEGER,
  3101.  
  3102.    o  minor_status INTEGER,
  3103.  
  3104.    o  max_input_size INTEGER
  3105.  
  3106.    Return major_status codes:
  3107.  
  3108.    o  GSS_S_COMPLETE indicates a successful token size determination:
  3109.    an input message with a length in octets equal to the
  3110.  
  3111.  
  3112.  
  3113. Linn               Document Expiration: 23 March 1998          [Page 52]
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119. Internet-Draft                                         23 September 1997
  3120.  
  3121.  
  3122.    returned max_input_size value will, when passed to GSS_Wrap()
  3123.    for processing on the context identified by the context_handle
  3124.    parameter and with the quality of protection specifier provided
  3125.    in the qop parameter, yield an output token no larger than the
  3126.    value of the provided output_size parameter.
  3127.  
  3128.    o  GSS_S_CONTEXT_EXPIRED indicates that the provided input context_handle
  3129.    is recognized, but that the referenced context has expired.  Return
  3130.    values other than major_status and minor_status are undefined.
  3131.  
  3132.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3133.    for the input context_handle provided. Return values other than
  3134.    major_status and minor_status are undefined.
  3135.  
  3136.    o  GSS_S_BAD_QOP indicates that the provided QOP value is not
  3137.    recognized or supported for the context.
  3138.  
  3139.    o  GSS_S_FAILURE indicates that the requested operation failed for
  3140.    reasons unspecified at the GSS-API level. Return values other than
  3141.    major_status and minor_status are undefined.
  3142.  
  3143.  
  3144.    This call is used to determine the largest input datum which may be
  3145.    passed to GSS_Wrap() without yielding an output token larger than a
  3146.    caller-specified value.
  3147.  
  3148. 2.2.8:   GSS_Export_sec_context call
  3149.  
  3150.    Inputs:
  3151.  
  3152.    o  context_handle CONTEXT HANDLE
  3153.  
  3154.    Outputs:
  3155.  
  3156.    o  major_status INTEGER,
  3157.  
  3158.    o  minor_status INTEGER,
  3159.  
  3160.    o  interprocess_token OCTET STRING  -- caller must release
  3161.            -- with GSS_Release_buffer()
  3162.  
  3163.    Return major_status codes:
  3164.  
  3165.    o  GSS_S_COMPLETE indicates that the referenced context has been
  3166.    successfully exported to a representation in the interprocess_token,
  3167.    and is no longer available for use by the caller.
  3168.  
  3169.    o  GSS_S_UNAVAILABLE indicates that the context export facility
  3170.  
  3171.  
  3172.  
  3173. Linn               Document Expiration: 23 March 1998          [Page 53]
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179. Internet-Draft                                         23 September 1997
  3180.  
  3181.  
  3182.    is not available for use on the referenced context.  (This status
  3183.    should occur only for contexts for which the trans_state value is
  3184.    FALSE.) Return values other than major_status and minor_status are
  3185.    undefined.
  3186.  
  3187.    o  GSS_S_CONTEXT_EXPIRED indicates that the provided input context_handle
  3188.    is recognized, but that the referenced context has expired.  Return
  3189.    values other than major_status and minor_status are undefined.
  3190.  
  3191.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3192.    for the input context_handle provided. Return values other than
  3193.    major_status and minor_status are undefined.
  3194.  
  3195.    o  GSS_S_FAILURE indicates that the requested operation failed for
  3196.    reasons unspecified at the GSS-API level. Return values other than
  3197.    major_status and minor_status are undefined.
  3198.  
  3199.    This call generates an interprocess token for transfer to another
  3200.    process within an end system, in order to transfer control of a
  3201.    security context to that process.  The recipient of the interprocess
  3202.    token will call GSS_Import_sec_context() to accept the transfer.  The
  3203.    GSS_Export_sec_context() operation is defined for use only with
  3204.    security contexts which are fully and successfully established (i.e.,
  3205.    those for which GSS_Init_sec_context() and GSS_Accept_sec_context()
  3206.    have returned GSS_S_COMPLETE major_status).
  3207.  
  3208.    A successful GSS_Export_sec_context() operation deactivates the
  3209.    security context for the calling process; for this case, the GSS-API
  3210.    implementation shall deallocate all process-wide resources associated
  3211.    with the security context and shall set the context_handle to
  3212.    GSS_C_NO_CONTEXT.  In the event of an error that makes it impossible
  3213.    to complete export of the secuirty context, the GSS-API
  3214.    implementation must not return an interprocess token and should
  3215.    strive to leave the security context referenced by the context_handle
  3216.    untouched.  If this is impossible, it is permissible for the
  3217.    implementation to delete the security context, provided that it also
  3218.    sets te context_handle parameter to GSS_C_NO_CONTEXT.
  3219.  
  3220.    Portable callers must not assume that a given interprocess token can
  3221.    be imported by GSS_Import_sec_context() more than once, thereby
  3222.    creating multiple instantiations of a single context.  GSS-API
  3223.    implementations may detect and reject attempted multiple imports, but
  3224.    are not required to do so.
  3225.  
  3226.    The internal representation contained within the interprocess token
  3227.    is an implementation-defined local matter.  Interprocess tokens
  3228.    cannot be assumed to be transferable across different GSS-API
  3229.    implementations.
  3230.  
  3231.  
  3232.  
  3233. Linn               Document Expiration: 23 March 1998          [Page 54]
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239. Internet-Draft                                         23 September 1997
  3240.  
  3241.  
  3242.    It is recommended that GSS-API implementations adopt policies suited
  3243.    to their operational environments in order to define the set of
  3244.    processes eligible to import a context, but specific constraints in
  3245.    this area are local matters.  Candidate examples include transfers
  3246.    between processes operating on behalf of the same user identity, or
  3247.    processes comprising a common job.  However, it may be impossible to
  3248.    enforce such policies in some implementations.
  3249.  
  3250.    In support of the above goals, implementations may protect the
  3251.    transferred context data by using cryptography to protect data within
  3252.    the interprocess token, or by using interprocess tokens as a means to
  3253.    reference local interprocess communication facilities (protected by
  3254.    other means) rather than storing the context data directly within the
  3255.    tokens.
  3256.  
  3257.    Transfer of an open context may, for certain mechanisms and
  3258.    implementations, reveal data about the credential which was used to
  3259.    establish the context.  Callers should, therefore, be cautious about
  3260.    the trustworthiness of processes to which they transfer contexts.
  3261.    Although the GSS-API implementation may provide its own set of
  3262.    protections over the exported context, the caller is responsible for
  3263.    protecting the interprocess token from disclosure, and for taking
  3264.    care that the context is transferred to an appropriate destination
  3265.    process.
  3266.  
  3267. 2.2.9:   GSS_Import_sec_context call
  3268.  
  3269.    Inputs:
  3270.  
  3271.    o  interprocess_token OCTET STRING
  3272.  
  3273.    Outputs:
  3274.  
  3275.    o  major_status INTEGER,
  3276.  
  3277.    o  minor_status INTEGER,
  3278.  
  3279.    o  context_handle CONTEXT HANDLE  -- if successfully returned,
  3280.            -- caller must release with GSS_Delete_sec_context()
  3281.  
  3282.    Return major_status codes:
  3283.  
  3284.    o  GSS_S_COMPLETE indicates that the context represented by the
  3285.    input interprocess_token has been successfully transferred to
  3286.    the caller, and is available for future use via the output
  3287.    context_handle.
  3288.  
  3289.    o  GSS_S_CONTEXT_EXPIRED indicates that the context represented by
  3290.  
  3291.  
  3292.  
  3293. Linn               Document Expiration: 23 March 1998          [Page 55]
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299. Internet-Draft                                         23 September 1997
  3300.  
  3301.  
  3302.    the input interprocess_token has expired. Return values other
  3303.    than major_status and minor_status are undefined.
  3304.  
  3305.    o  GSS_S_NO_CONTEXT indicates that the context represented by the
  3306.    input interprocess_token was invalid. Return values other than
  3307.    major_status and minor_status are undefined.
  3308.  
  3309.    o  GSS_S_DEFECTIVE_TOKEN indicates that the input interprocess_token
  3310.    was defective.  Return values other than major_status and minor_status
  3311.    are undefined.
  3312.  
  3313.    o  GSS_S_UNAVAILABLE indicates that the context import facility
  3314.    is not available for use on the referenced context.  Return values
  3315.    other than major_status and minor_status are undefined.
  3316.  
  3317.    o  GSS_S_UNAUTHORIZED indicates that the context represented by
  3318.    the input interprocess_token is unauthorized for transfer to the
  3319.    caller. Return values other than major_status and minor_status
  3320.    are undefined.
  3321.  
  3322.    o  GSS_S_FAILURE indicates that the requested operation failed for
  3323.    reasons unspecified at the GSS-API level. Return values other than
  3324.    major_status and minor_status are undefined.
  3325.  
  3326.    This call processes an interprocess token generated by
  3327.    GSS_Export_sec_context(), making the transferred context available
  3328.    for use by the caller.  After a successful GSS_Import_sec_context()
  3329.    operation, the imported context is available for use by the importing
  3330.    process. In particular, the imported context is usable for all per-
  3331.    message operations and may be deleted or exported by its importer.
  3332.    The inability to receive delegated credentials through
  3333.    gss_import_sec_context() precludes establishment of new contexts
  3334.    based on information delegated to the importer's end system within
  3335.    the context which is being imported, unless those delegated
  3336.    credentials are obtained through separate routines (e.g., XGSS-API
  3337.    calls) outside the GSS-V2 definition.
  3338.  
  3339.    For further discussion of the security and authorization issues
  3340.    regarding this call, please see the discussion in Section 2.2.8.
  3341.  
  3342. 2.3:  Per-message calls
  3343.  
  3344.    This group of calls is used to perform per-message protection
  3345.    processing on an established security context. None of these calls
  3346.    block pending network interactions. These calls may be invoked by a
  3347.    context's initiator or by the context's target.  The four members of
  3348.    this group should be considered as two pairs; the output from
  3349.    GSS_GetMIC()  is properly input to GSS_VerifyMIC(), and the output
  3350.  
  3351.  
  3352.  
  3353. Linn               Document Expiration: 23 March 1998          [Page 56]
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359. Internet-Draft                                         23 September 1997
  3360.  
  3361.  
  3362.    from GSS_Wrap() is properly input to GSS_Unwrap().
  3363.  
  3364.    GSS_GetMIC() and GSS_VerifyMIC() support data origin authentication
  3365.    and data integrity services. When GSS_GetMIC()  is invoked on an
  3366.    input message, it yields a per-message token containing data items
  3367.    which allow underlying mechanisms to provide the specified security
  3368.    services. The original message, along with the generated per-message
  3369.    token, is passed to the remote peer; these two data elements are
  3370.    processed by GSS_VerifyMIC(),  which validates the message in
  3371.    conjunction with the separate token.
  3372.  
  3373.    GSS_Wrap() and GSS_Unwrap() support caller-requested confidentiality
  3374.    in addition to the data origin authentication and data integrity
  3375.    services offered by GSS_GetMIC()  and GSS_VerifyMIC(). GSS_Wrap()
  3376.    outputs a single data element, encapsulating optionally enciphered
  3377.    user data as well as associated token data items.  The data element
  3378.    output from GSS_Wrap() is passed to the remote peer and processed by
  3379.    GSS_Unwrap() at that system. GSS_Unwrap() combines decipherment (as
  3380.    required) with validation of data items related to authentication and
  3381.    integrity.
  3382.  
  3383.    Although zero-length tokens are never returned by GSS calls for
  3384.    transfer to a context's peer, a zero-length object may be passed by a
  3385.    caller into GSS_Wrap(), in which case the corresponding peer calling
  3386.    GSS_Unwrap() on the transferred token will receive a zero-length
  3387.    object as output from GSS_Unwrap().  Similarly, GSS_GetMIC() can be
  3388.    called on an empty object, yielding a MIC which GSS_VerifyMIC() will
  3389.    successfully verify against the active security context in
  3390.    conjunction with a zero-length object.
  3391.  
  3392. 2.3.1:  GSS_GetMIC call
  3393.  
  3394.    Note: This call is functionally equivalent to the GSS_Sign call as
  3395.    defined in previous versions of this specification. In the interests
  3396.    of backward compatibility, it is recommended that implementations
  3397.    support this function under both names for the present; future
  3398.    references to this function as GSS_Sign are deprecated.
  3399.  
  3400.    Inputs:
  3401.  
  3402.    o  context_handle CONTEXT HANDLE,
  3403.  
  3404.    o  qop_req INTEGER, -- 0 specifies default QOP
  3405.  
  3406.    o  message OCTET STRING
  3407.  
  3408.    Outputs:
  3409.  
  3410.  
  3411.  
  3412.  
  3413. Linn               Document Expiration: 23 March 1998          [Page 57]
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419. Internet-Draft                                         23 September 1997
  3420.  
  3421.  
  3422.    o  major_status INTEGER,
  3423.  
  3424.    o  minor_status INTEGER,
  3425.  
  3426.    o  per_msg_token OCTET STRING  -- caller must release
  3427.            -- with GSS_Release_buffer()
  3428.  
  3429.    Return major_status codes:
  3430.  
  3431.    o  GSS_S_COMPLETE indicates that an integrity check, suitable for an
  3432.       established security context, was successfully applied and
  3433.       that the message and corresponding per_msg_token are ready
  3434.       for transmission.
  3435.  
  3436.    o  GSS_S_CONTEXT_EXPIRED indicates that context-related data
  3437.       items have expired, so that the requested operation cannot be
  3438.       performed.
  3439.  
  3440.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the context is recognized,
  3441.       but that its associated credentials have expired, so
  3442.       that the requested operation cannot be performed.  Return of
  3443.       this status by this routine is deprecated.
  3444.  
  3445.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3446.       for the input context_handle provided.
  3447.  
  3448.    o  GSS_S_BAD_QOP indicates that the provided QOP value is not
  3449.       recognized or supported for the context.
  3450.  
  3451.    o  GSS_S_FAILURE indicates that the context is recognized, but
  3452.       that the requested operation could not be performed for
  3453.       reasons unspecified at the GSS-API level.
  3454.  
  3455.    Using the security context referenced by context_handle, apply an
  3456.    integrity check to the input message (along with timestamps and/or
  3457.    other data included in support of mech_type-specific mechanisms) and
  3458.    return the result in per_msg_token. The qop_req parameter,
  3459.    interpretation of which is discussed in Section 1.2.4, allows
  3460.    quality-of-protection control. The caller passes the message and the
  3461.    per_msg_token to the target.
  3462.  
  3463.    The GSS_GetMIC()  function completes before the message and
  3464.    per_msg_token is sent to the peer; successful application of
  3465.    GSS_GetMIC()  does not guarantee that a corresponding GSS_VerifyMIC()
  3466.    has been (or can necessarily be) performed successfully when the
  3467.    message arrives at the destination.
  3468.  
  3469.    Mechanisms which do not support per-message protection services
  3470.  
  3471.  
  3472.  
  3473. Linn               Document Expiration: 23 March 1998          [Page 58]
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479. Internet-Draft                                         23 September 1997
  3480.  
  3481.  
  3482.    should return GSS_S_FAILURE if this routine is called.
  3483.  
  3484. 2.3.2:  GSS_VerifyMIC call
  3485.  
  3486.    Note: This call is functionally equivalent to the GSS_Verify call as
  3487.    defined in previous versions of this specification. In the interests
  3488.    of backward compatibility, it is recommended that implementations
  3489.    support this function under both names for the present; future
  3490.    references to this function as GSS_Verify are deprecated.
  3491.  
  3492.    Inputs:
  3493.  
  3494.    o  context_handle CONTEXT HANDLE,
  3495.  
  3496.    o  message OCTET STRING,
  3497.  
  3498.    o  per_msg_token OCTET STRING
  3499.  
  3500.    Outputs:
  3501.  
  3502.    o  qop_state INTEGER,
  3503.  
  3504.    o  major_status INTEGER,
  3505.  
  3506.    o  minor_status INTEGER,
  3507.  
  3508.    Return major_status codes:
  3509.  
  3510.    o  GSS_S_COMPLETE indicates that the message was successfully
  3511.       verified.
  3512.  
  3513.    o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed
  3514.       on the received per_msg_token failed, preventing
  3515.       further processing from being performed with that token.
  3516.  
  3517.    o  GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that the received
  3518.       per_msg_token contains an incorrect integrity check for the message.
  3519.  
  3520.    o  GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN,
  3521.       and GSS_S_GAP_TOKEN values appear in conjunction with the
  3522.       optional per-message replay detection features described
  3523.       in Section 1.2.3; their semantics are described in that section.
  3524.  
  3525.    o  GSS_S_CONTEXT_EXPIRED indicates that context-related data
  3526.       items have expired, so that the requested operation cannot be
  3527.       performed.
  3528.  
  3529.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the context is recognized,
  3530.  
  3531.  
  3532.  
  3533. Linn               Document Expiration: 23 March 1998          [Page 59]
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539. Internet-Draft                                         23 September 1997
  3540.  
  3541.  
  3542.       but that its associated credentials have expired, so
  3543.       that the requested operation cannot be performed.  Return of this
  3544.       status by this routine is deprecated.
  3545.  
  3546.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3547.       for the input context_handle provided.
  3548.  
  3549.    o  GSS_S_FAILURE indicates that the context is recognized, but
  3550.       that the GSS_VerifyMIC() operation could not be performed for
  3551.       reasons unspecified at the GSS-API level.
  3552.  
  3553.    Using the security context referenced by context_handle, verify that
  3554.    the input per_msg_token contains an appropriate integrity check for
  3555.    the input message, and apply any active replay detection or
  3556.    sequencing features. Return an indication of the quality-of-
  3557.    protection applied to the processed message in the qop_state result.
  3558.  
  3559.    Mechanisms which do not support per-message protection services
  3560.    should return GSS_S_FAILURE if this routine is called.
  3561.  
  3562. 2.3.3: GSS_Wrap call
  3563.  
  3564.    Note: This call is functionally equivalent to the GSS_Seal call as
  3565.    defined in previous versions of this specification. In the interests
  3566.    of backward compatibility, it is recommended that implementations
  3567.    support this function under both names for the present; future
  3568.    references to this function as GSS_Seal are deprecated.
  3569.  
  3570.    Inputs:
  3571.  
  3572.    o  context_handle CONTEXT HANDLE,
  3573.  
  3574.    o  conf_req_flag BOOLEAN,
  3575.  
  3576.    o  qop_req INTEGER, -- 0 specifies default QOP
  3577.  
  3578.    o  input_message OCTET STRING
  3579.  
  3580.    Outputs:
  3581.  
  3582.    o  major_status INTEGER,
  3583.  
  3584.    o  minor_status INTEGER,
  3585.  
  3586.    o  conf_state BOOLEAN,
  3587.  
  3588.    o  output_message OCTET STRING  -- caller must release with
  3589.            -- GSS_Release_buffer()
  3590.  
  3591.  
  3592.  
  3593. Linn               Document Expiration: 23 March 1998          [Page 60]
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599. Internet-Draft                                         23 September 1997
  3600.  
  3601.  
  3602.    Return major_status codes:
  3603.  
  3604.    o  GSS_S_COMPLETE indicates that the input_message was successfully
  3605.       processed and that the output_message is ready for
  3606.       transmission.
  3607.  
  3608.    o  GSS_S_CONTEXT_EXPIRED indicates that context-related data
  3609.       items have expired, so that the requested operation cannot be
  3610.       performed.
  3611.  
  3612.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the context is recognized,
  3613.       but that its associated credentials have expired, so
  3614.       that the requested operation cannot be performed.  Return of this
  3615.       status by this routine is deprecated.
  3616.  
  3617.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3618.       for the input context_handle provided.
  3619.  
  3620.    o  GSS_S_BAD_QOP indicates that the provided QOP value is not
  3621.       recognized or supported for the context.
  3622.  
  3623.    o  GSS_S_FAILURE indicates that the context is recognized, but
  3624.       that the GSS_Wrap()  operation could not be performed for
  3625.       reasons unspecified at the GSS-API level.
  3626.  
  3627.    Performs the data origin authentication and data integrity functions
  3628.    of GSS_GetMIC().  If the input conf_req_flag is TRUE, requests that
  3629.    confidentiality be applied to the input_message.  Confidentiality may
  3630.    not be supported in all mech_types or by all implementations; the
  3631.    returned conf_state flag indicates whether confidentiality was
  3632.    provided for the input_message. The qop_req parameter, interpretation
  3633.    of which is discussed in Section 1.2.4, allows quality-of-protection
  3634.    control.
  3635.  
  3636.    In all cases, the GSS_Wrap() call yields a single output_message data
  3637.    element containing (optionally enciphered) user data as well as
  3638.    control information.
  3639.  
  3640.    Mechanisms which do not support per-message protection services
  3641.    should return GSS_S_FAILURE if this routine is called.
  3642.  
  3643. 2.3.4: GSS_Unwrap call
  3644.  
  3645.    Note: This call is functionally equivalent to the GSS_Unseal call as
  3646.    defined in previous versions of this specification. In the interests
  3647.    of backward compatibility, it is recommended that implementations
  3648.    support this function under both names for the present; future
  3649.    references to this function as GSS_Unseal are deprecated.
  3650.  
  3651.  
  3652.  
  3653. Linn               Document Expiration: 23 March 1998          [Page 61]
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659. Internet-Draft                                         23 September 1997
  3660.  
  3661.  
  3662.    Inputs:
  3663.  
  3664.    o  context_handle CONTEXT HANDLE,
  3665.  
  3666.    o  input_message OCTET STRING
  3667.  
  3668.    Outputs:
  3669.  
  3670.    o  conf_state BOOLEAN,
  3671.  
  3672.    o  qop_state INTEGER,
  3673.  
  3674.    o  major_status INTEGER,
  3675.  
  3676.    o  minor_status INTEGER,
  3677.  
  3678.    o  output_message OCTET STRING  -- caller must release with
  3679.            -- GSS_Release_buffer()
  3680.  
  3681.    Return major_status codes:
  3682.  
  3683.    o  GSS_S_COMPLETE indicates that the input_message was
  3684.       successfully processed and that the resulting output_message is
  3685.       available.
  3686.  
  3687.    o  GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed
  3688.       on the per_msg_token extracted from the input_message
  3689.       failed, preventing further processing from being performed.
  3690.  
  3691.    o  GSS_S_BAD_SIG (GSS_S_BAD_MIC) indicates that an incorrect
  3692.       integrity check was detected for the message.
  3693.  
  3694.    o  GSS_S_DUPLICATE_TOKEN, GSS_S_OLD_TOKEN, GSS_S_UNSEQ_TOKEN,
  3695.       and GSS_S_GAP_TOKEN values appear in conjunction with the
  3696.       optional per-message replay detection features described
  3697.       in Section 1.2.3; their semantics are described in that section.
  3698.  
  3699.    o  GSS_S_CONTEXT_EXPIRED indicates that context-related data
  3700.       items have expired, so that the requested operation cannot be
  3701.       performed.
  3702.  
  3703.    o  GSS_S_CREDENTIALS_EXPIRED indicates that the context is recognized,
  3704.       but that its associated credentials have expired, so
  3705.       that the requested operation cannot be performed.  Return of this
  3706.       status by this routine is deprecated.
  3707.  
  3708.    o  GSS_S_NO_CONTEXT indicates that no valid context was recognized
  3709.       for the input context_handle provided.
  3710.  
  3711.  
  3712.  
  3713. Linn               Document Expiration: 23 March 1998          [Page 62]
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719. Internet-Draft                                         23 September 1997
  3720.  
  3721.  
  3722.    o  GSS_S_FAILURE indicates that the context is recognized, but
  3723.       that the GSS_Unwrap()  operation could not be performed for
  3724.       reasons unspecified at the GSS-API level.
  3725.  
  3726.    Processes a data element generated (and optionally enciphered) by
  3727.    GSS_Wrap(), provided as input_message. The returned conf_state value
  3728.    indicates whether confidentiality was applied to the input_message.
  3729.    If conf_state is TRUE, GSS_Unwrap()  deciphers the input_message.
  3730.    Returns an indication of the quality-of-protection applied to the
  3731.    processed message in the qop_state result. GSS_Wrap() performs the
  3732.    data integrity and data origin authentication checking functions of
  3733.    GSS_VerifyMIC()  on the plaintext data. Plaintext data is returned in
  3734.    output_message.
  3735.  
  3736.    Mechanisms which do not support per-message protection services
  3737.    should return GSS_S_FAILURE if this routine is called.
  3738.  
  3739. 2.4:  Support calls
  3740.  
  3741.    This group of calls provides support functions useful to GSS-API
  3742.    callers, independent of the state of established contexts. Their
  3743.    characterization with regard to blocking or non-blocking status in
  3744.    terms of network interactions is unspecified.
  3745.  
  3746. 2.4.1:  GSS_Display_status call
  3747.  
  3748.    Inputs:
  3749.  
  3750.    o  status_value INTEGER, -- GSS-API major_status or minor_status
  3751.            -- return value
  3752.  
  3753.    o  status_type INTEGER, -- 1 if major_status, 2 if minor_status
  3754.  
  3755.    o  mech_type OBJECT IDENTIFIER -- mech_type to be used for minor_
  3756.            -- status translation
  3757.  
  3758.    Outputs:
  3759.  
  3760.    o  major_status INTEGER,
  3761.  
  3762.    o  minor_status INTEGER,
  3763.  
  3764.    o  status_string_set SET OF OCTET STRING  -- required calls for
  3765.            -- release by caller are specific to language bindings
  3766.  
  3767.    Return major_status codes:
  3768.  
  3769.    o  GSS_S_COMPLETE indicates that a valid printable status representation
  3770.  
  3771.  
  3772.  
  3773. Linn               Document Expiration: 23 March 1998          [Page 63]
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779. Internet-Draft                                         23 September 1997
  3780.  
  3781.  
  3782.       (possibly representing more than one status event
  3783.       encoded within the status_value) is available in the returned
  3784.       status_string_set.
  3785.  
  3786.    o  GSS_S_BAD_MECH indicates that translation in accordance with an
  3787.       unsupported mech_type was requested, so translation could not
  3788.       be performed.
  3789.  
  3790.    o  GSS_S_BAD_STATUS indicates that the input status_value was
  3791.       invalid, or that the input status_type carried a value other
  3792.       than 1 or 2, so translation could not be performed.
  3793.  
  3794.    o  GSS_S_FAILURE indicates that the requested operation could not
  3795.       be performed for reasons unspecified at the GSS-API level.
  3796.  
  3797.    Provides a means for callers to translate GSS-API-returned major and
  3798.    minor status codes into printable string representations.  Note: some
  3799.    language bindings may employ an iterative approach in order to emit
  3800.    successive status components; this approach is acceptable but not
  3801.    required for conformance with the current specification.
  3802.  
  3803.    Although not contemplated in RFC-2078, it has been observed that some
  3804.    existing GSS-API implementations return GSS_S_CONTINUE_NEEDED status
  3805.    when iterating through successive messages returned from
  3806.    GSS_Display_status(). This behavior is deprecated;
  3807.    GSS_S_CONTINUE_NEEDED should be returned only by
  3808.    GSS_Init_sec_context() and GSS_Accept_sec_context().  For maximal
  3809.    portability, however, it is recommended that defensive callers be
  3810.    able to accept and ignore GSS_S_CONTINUE_NEEDED status if indicated
  3811.    by GSS_Display_status() or any other call other than
  3812.    GSS_Init_sec_context() or GSS_Accept_sec_context().
  3813.  
  3814. 2.4.2:  GSS_Indicate_mechs call
  3815.  
  3816.    Input:
  3817.  
  3818.    o  (none)
  3819.  
  3820.    Outputs:
  3821.  
  3822.    o  major_status INTEGER,
  3823.  
  3824.    o  minor_status INTEGER,
  3825.  
  3826.    o  mech_set SET OF OBJECT IDENTIFIER  -- caller must release
  3827.            -- with GSS_Release_oid_set()
  3828.  
  3829.    Return major_status codes:
  3830.  
  3831.  
  3832.  
  3833. Linn               Document Expiration: 23 March 1998          [Page 64]
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839. Internet-Draft                                         23 September 1997
  3840.  
  3841.  
  3842.    o  GSS_S_COMPLETE indicates that a set of available mechanisms has
  3843.       been returned in mech_set.
  3844.  
  3845.    o  GSS_S_FAILURE indicates that the requested operation could not
  3846.       be performed for reasons unspecified at the GSS-API level.
  3847.  
  3848.    Allows callers to determine the set of mechanism types available on
  3849.    the local system. This call is intended for support of specialized
  3850.    callers who need to request non-default mech_type sets from
  3851.    GSS_Acquire_cred(),  and should not be needed by other callers.
  3852.  
  3853. 2.4.3:  GSS_Compare_name call
  3854.  
  3855.    Inputs:
  3856.  
  3857.    o  name1 INTERNAL NAME,
  3858.  
  3859.    o  name2 INTERNAL NAME
  3860.  
  3861.    Outputs:
  3862.  
  3863.    o  major_status INTEGER,
  3864.  
  3865.    o  minor_status INTEGER,
  3866.  
  3867.    o  name_equal BOOLEAN
  3868.  
  3869.    Return major_status codes:
  3870.  
  3871.    o  GSS_S_COMPLETE indicates that name1 and name2 were comparable,
  3872.       and that the name_equal result indicates whether name1 and
  3873.       name2 represent the same entity.
  3874.  
  3875.    o  GSS_S_BAD_NAMETYPE indicates that
  3876.       the two input names' types are different and incomparable, so that
  3877.       the comparison operation could not be completed.
  3878.  
  3879.    o  GSS_S_BAD_NAME indicates that one or both of the input names
  3880.       was ill-formed in terms of its internal type specifier, so
  3881.       the comparison operation could not be completed.
  3882.  
  3883.    o  GSS_S_FAILURE indicates that the call's operation could not
  3884.       be performed for reasons unspecified at the GSS-API level.
  3885.  
  3886.    Allows callers to compare two internal name representations to
  3887.    determine whether they refer to the same entity.  If either name
  3888.    presented to GSS_Compare_name() denotes an anonymous principal,
  3889.    GSS_Compare_name() shall indicate FALSE.  It is not required that
  3890.  
  3891.  
  3892.  
  3893. Linn               Document Expiration: 23 March 1998          [Page 65]
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899. Internet-Draft                                         23 September 1997
  3900.  
  3901.  
  3902.    either or both inputs name1 and name2 be MNs; for some
  3903.    implementations and cases, GSS_S_BAD_NAMETYPE may be returned,
  3904.    indicating name incomparability, for the case where neither input
  3905.    name is an MN.
  3906.  
  3907. 2.4.4:  GSS_Display_name call
  3908.  
  3909.    Inputs:
  3910.  
  3911.    o  name INTERNAL NAME
  3912.  
  3913.    Outputs:
  3914.  
  3915.    o  major_status INTEGER,
  3916.  
  3917.    o  minor_status INTEGER,
  3918.  
  3919.    o  name_string OCTET STRING, -- caller must release
  3920.            -- with GSS_Release_buffer()
  3921.  
  3922.    o  name_type OBJECT IDENTIFIER  -- caller should treat
  3923.            -- as read-only; does not need to be released
  3924.  
  3925.    Return major_status codes:
  3926.  
  3927.    o  GSS_S_COMPLETE indicates that a valid printable name
  3928.       representation is available in the returned name_string.
  3929.  
  3930.    o  GSS_S_BAD_NAME indicates that the contents of the provided name
  3931.       were inconsistent with the internally-indicated name type, so
  3932.       no printable representation could be generated.
  3933.  
  3934.    o  GSS_S_FAILURE indicates that the requested operation could not
  3935.       be performed for reasons unspecified at the GSS-API level.
  3936.  
  3937.    Allows callers to translate an internal name representation into a
  3938.    printable form with associated namespace type descriptor. The syntax
  3939.    of the printable form is a local matter.
  3940.  
  3941.    If the input name represents an anonymous identity, a reserved value
  3942.    (GSS_C_NT_ANONYMOUS) shall be returned for name_type.
  3943.  
  3944.    The GSS_C_NO_OID name type is to be returned only when the
  3945.    corresponding internal name was created through import with
  3946.    GSS_C_NO_OID. It is acceptable for mechanisms to normalize names
  3947.    imported with GSS_C_NO_OID into other supported types and, therefore,
  3948.    to display them with types other than GSS_C_NO_OID.
  3949.  
  3950.  
  3951.  
  3952.  
  3953. Linn               Document Expiration: 23 March 1998          [Page 66]
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959. Internet-Draft                                         23 September 1997
  3960.  
  3961.  
  3962. 2.4.5:  GSS_Import_name call
  3963.  
  3964.    Inputs:
  3965.  
  3966.    o  input_name_string OCTET STRING,
  3967.  
  3968.    o  input_name_type OBJECT IDENTIFIER
  3969.  
  3970.    Outputs:
  3971.  
  3972.    o  major_status INTEGER,
  3973.  
  3974.    o  minor_status INTEGER,
  3975.  
  3976.    o  output_name INTERNAL NAME  -- caller must release with
  3977.            -- GSS_Release_name()
  3978.  
  3979.    Return major_status codes:
  3980.  
  3981.    o  GSS_S_COMPLETE indicates that a valid name representation is
  3982.       output in output_name and described by the type value in
  3983.       output_name_type.
  3984.  
  3985.    o  GSS_S_BAD_NAMETYPE indicates that the input_name_type is unsupported
  3986.       by the applicable underlying GSS-API mechanism(s), so the import
  3987.       operation could not be completed.
  3988.  
  3989.    o  GSS_S_BAD_NAME indicates that the provided input_name_string
  3990.       is ill-formed in terms of the input_name_type, so the import
  3991.       operation could not be completed.
  3992.  
  3993.    o  GSS_S_FAILURE indicates that the requested operation could not
  3994.       be performed for reasons unspecified at the GSS-API level.
  3995.  
  3996.    Allows callers to provide a name representation as a contiguous octet
  3997.    string, designate the type of namespace in conjunction with which it
  3998.    should be parsed, and convert that representation to an internal form
  3999.    suitable for input to other GSS-API routines.  The syntax of the
  4000.    input_name_string is defined in conjunction with its associated name
  4001.    type; depending on the input_name_type, the associated
  4002.    input_name_string may or may not be a printable string.  If the
  4003.    input_name_type's value is GSS_C_NO_OID, a mechanism-specific default
  4004.    printable syntax (which shall be specified in the corresponding GSS-
  4005.    V2 mechanism specification) is assumed for the input_name_string;
  4006.    other input_name_type values as registered by GSS-API implementations
  4007.    can be used to indicate specific non-default name syntaxes. Note: The
  4008.    input_name_type argument serves to describe and qualify the
  4009.    interpretation of the associated input_name_string; it does not
  4010.  
  4011.  
  4012.  
  4013. Linn               Document Expiration: 23 March 1998          [Page 67]
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019. Internet-Draft                                         23 September 1997
  4020.  
  4021.  
  4022.    specify the data type of the returned output_name.
  4023.  
  4024.    If a mechanism claims support for a particular name type, its
  4025.    GSS_Import_name() operation shall be able to accept all possible
  4026.    values conformant to the external name syntax as defined for that
  4027.    name type.  These imported values may correspond to:
  4028.  
  4029.         (1) locally registered entities (for which credentials may be
  4030.         acquired),
  4031.  
  4032.         (2) non-local entities (for which local credentials cannot be
  4033.         acquired, but which may be referenced as targets of initiated
  4034.         security contexts or initiators of accepted security contexts),
  4035.         or to
  4036.  
  4037.         (3) neither of the above.
  4038.  
  4039.    Determination of whether a particular name belongs to class (1), (2),
  4040.    or (3) as described above is not guaranteed to be performed by the
  4041.    GSS_Import_name() function.
  4042.  
  4043.    The internal name generated by a GSS_Import_name() operation may be a
  4044.    single-mechanism MN, and is likely to be an MN within a single-
  4045.    mechanism implementation, but portable callers must not depend on
  4046.    this property (and must not, therefore, assume that the output from
  4047.    GSS_Import_name() can be passed directly to GSS_Export_name() without
  4048.    first being processed through GSS_Canonicalize_name()).
  4049.  
  4050. 2.4.6: GSS_Release_name call
  4051.  
  4052.    Inputs:
  4053.  
  4054.    o  name INTERNAL NAME
  4055.  
  4056.    Outputs:
  4057.  
  4058.    o  major_status INTEGER,
  4059.  
  4060.    o  minor_status INTEGER
  4061.  
  4062.    Return major_status codes:
  4063.  
  4064.    o  GSS_S_COMPLETE indicates that the storage associated with the
  4065.       input name was successfully released.
  4066.  
  4067.    o  GSS_S_BAD_NAME indicates that the input name argument did not
  4068.       contain a valid name.
  4069.  
  4070.  
  4071.  
  4072.  
  4073. Linn               Document Expiration: 23 March 1998          [Page 68]
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079. Internet-Draft                                         23 September 1997
  4080.  
  4081.  
  4082.    o  GSS_S_FAILURE indicates that the requested operation could not
  4083.       be performed for reasons unspecified at the GSS-API level.
  4084.  
  4085.    Allows callers to release the storage associated with an internal
  4086.    name representation.  This call's specific behavior depends on the
  4087.    language and programming environment within which a GSS-API
  4088.    implementation operates, and is therefore detailed within applicable
  4089.    bindings specifications; in particular, this call may be superfluous
  4090.    (and may be omitted) within bindings where memory management is
  4091.    automatic.
  4092.  
  4093.  
  4094. 2.4.7: GSS_Release_buffer call
  4095.  
  4096.    Inputs:
  4097.  
  4098.    o  buffer OCTET STRING
  4099.  
  4100.    Outputs:
  4101.  
  4102.    o  major_status INTEGER,
  4103.  
  4104.    o  minor_status INTEGER
  4105.  
  4106.    Return major_status codes:
  4107.  
  4108.    o  GSS_S_COMPLETE indicates that the storage associated with the
  4109.       input buffer was successfully released.
  4110.  
  4111.    o  GSS_S_FAILURE indicates that the requested operation could not
  4112.       be performed for reasons unspecified at the GSS-API level.
  4113.  
  4114.    Allows callers to release the storage associated with an OCTET STRING
  4115.    buffer allocated by another GSS-API call.  This call's specific
  4116.    behavior depends on the language and programming environment within
  4117.    which a GSS-API implementation operates, and is therefore detailed
  4118.    within applicable bindings specifications; in particular, this call
  4119.    may be superfluous (and may be omitted) within bindings where memory
  4120.    management is automatic.
  4121.  
  4122. 2.4.8: GSS_Release_OID_set call
  4123.  
  4124.    Inputs:
  4125.  
  4126.    o  buffer SET OF OBJECT IDENTIFIER
  4127.  
  4128.    Outputs:
  4129.  
  4130.  
  4131.  
  4132.  
  4133. Linn               Document Expiration: 23 March 1998          [Page 69]
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139. Internet-Draft                                         23 September 1997
  4140.  
  4141.  
  4142.    o  major_status INTEGER,
  4143.  
  4144.    o  minor_status INTEGER
  4145.  
  4146.    Return major_status codes:
  4147.  
  4148.    o  GSS_S_COMPLETE indicates that the storage associated with the
  4149.       input object identifier set was successfully released.
  4150.  
  4151.    o  GSS_S_FAILURE indicates that the requested operation could not
  4152.       be performed for reasons unspecified at the GSS-API level.
  4153.  
  4154.    Allows callers to release the storage associated with an object
  4155.    identifier set object allocated by another GSS-API call.  This call's
  4156.    specific behavior depends on the language and programming environment
  4157.    within which a GSS-API implementation operates, and is therefore
  4158.    detailed within applicable bindings specifications; in particular,
  4159.    this call may be superfluous (and may be omitted) within bindings
  4160.    where memory management is automatic.
  4161.  
  4162. 2.4.9: GSS_Create_empty_OID_set call
  4163.  
  4164.    Inputs:
  4165.  
  4166.    o  (none)
  4167.  
  4168.    Outputs:
  4169.  
  4170.    o  major_status INTEGER,
  4171.  
  4172.    o  minor_status INTEGER,
  4173.  
  4174.    o  oid_set SET OF OBJECT IDENTIFIER  -- caller must release
  4175.            -- with GSS_Release_oid_set()
  4176.  
  4177.    Return major_status codes:
  4178.  
  4179.    o  GSS_S_COMPLETE indicates successful completion
  4180.  
  4181.    o  GSS_S_FAILURE indicates that the operation failed
  4182.  
  4183.  
  4184.    Creates an object identifier set containing no object identifiers, to
  4185.    which members may be subsequently added using the
  4186.    GSS_Add_OID_set_member() routine.  These routines are intended to be
  4187.    used to construct sets of mechanism object identifiers, for input to
  4188.    GSS_Acquire_cred().
  4189.  
  4190.  
  4191.  
  4192.  
  4193. Linn               Document Expiration: 23 March 1998          [Page 70]
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199. Internet-Draft                                         23 September 1997
  4200.  
  4201.  
  4202. 2.4.10: GSS_Add_OID_set_member call
  4203.  
  4204.    Inputs:
  4205.  
  4206.    o  member_oid OBJECT IDENTIFIER,
  4207.  
  4208.    o  oid_set SET OF OBJECT IDENTIFIER
  4209.  
  4210.    Outputs:
  4211.  
  4212.    o  major_status INTEGER,
  4213.  
  4214.    o  minor_status INTEGER,
  4215.  
  4216.    Return major_status codes:
  4217.  
  4218.    o  GSS_S_COMPLETE indicates successful completion
  4219.  
  4220.    o  GSS_S_FAILURE indicates that the operation failed
  4221.  
  4222.  
  4223.    Adds an Object Identifier to an Object Identifier set.  This routine
  4224.    is intended for use in conjunction with GSS_Create_empty_OID_set()
  4225.    when constructing a set of mechanism OIDs for input to
  4226.    GSS_Acquire_cred().
  4227.  
  4228.  
  4229. 2.4.11: GSS_Test_OID_set_member call
  4230.  
  4231.    Inputs:
  4232.  
  4233.    o  member OBJECT IDENTIFIER,
  4234.  
  4235.    o  set SET OF OBJECT IDENTIFIER
  4236.  
  4237.    Outputs:
  4238.  
  4239.    o  major_status INTEGER,
  4240.  
  4241.    o  minor_status INTEGER,
  4242.  
  4243.    o  present BOOLEAN
  4244.  
  4245.    Return major_status codes:
  4246.  
  4247.    o  GSS_S_COMPLETE indicates successful completion
  4248.  
  4249.    o  GSS_S_FAILURE indicates that the operation failed
  4250.  
  4251.  
  4252.  
  4253. Linn               Document Expiration: 23 March 1998          [Page 71]
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259. Internet-Draft                                         23 September 1997
  4260.  
  4261.  
  4262.    Interrogates an Object Identifier set to determine whether a
  4263.    specified Object Identifier is a member.  This routine is intended to
  4264.    be used with OID sets returned by GSS_Indicate_mechs(),
  4265.    GSS_Acquire_cred(), and GSS_Inquire_cred().
  4266.  
  4267.  
  4268. 2.4.12:  GSS_Inquire_names_for_mech call
  4269.  
  4270.    Input:
  4271.  
  4272.    o  input_mech_type OBJECT IDENTIFIER, -- mechanism type
  4273.  
  4274.    Outputs:
  4275.  
  4276.    o  major_status INTEGER,
  4277.  
  4278.    o  minor_status INTEGER,
  4279.  
  4280.    o  name_type_set SET OF OBJECT IDENTIFIER -- caller must release
  4281.            -- with GSS_Release_oid_set()
  4282.  
  4283.    Return major_status codes:
  4284.  
  4285.    o  GSS_S_COMPLETE indicates that the output name_type_set contains
  4286.       a list of name types which are supported by the locally available
  4287.       mechanism identified by input_mech_type.
  4288.  
  4289.    o  GSS_S_BAD_MECH indicates that the mechanism identified by
  4290.       input_mech_type was unsupported within the local implementation,
  4291.       causing the query to fail.
  4292.  
  4293.    o  GSS_S_FAILURE indicates that the requested operation could not
  4294.       be performed for reasons unspecified at the GSS-API level.
  4295.  
  4296.    Allows callers to determine the set of name types which are
  4297.    supportable by a specific locally-available mechanism.
  4298.  
  4299.  
  4300. 2.4.13: GSS_Inquire_mechs_for_name call
  4301.  
  4302.    Inputs:
  4303.  
  4304.    o  input_name INTERNAL NAME,
  4305.  
  4306.    Outputs:
  4307.  
  4308.    o  major_status INTEGER,
  4309.  
  4310.  
  4311.  
  4312.  
  4313. Linn               Document Expiration: 23 March 1998          [Page 72]
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319. Internet-Draft                                         23 September 1997
  4320.  
  4321.  
  4322.    o  minor_status INTEGER,
  4323.  
  4324.    o  mech_types SET OF OBJECT IDENTIFIER  -- caller must release
  4325.            -- with GSS_Release_oid_set()
  4326.  
  4327.    Return major_status codes:
  4328.  
  4329.    o  GSS_S_COMPLETE indicates that a set of object identifiers,
  4330.       corresponding to the set of mechanisms suitable for processing
  4331.       the input_name, is available in mech_types.
  4332.  
  4333.    o  GSS_S_BAD_NAME indicates that the input_name was ill-formed
  4334.       and could not be processed.
  4335.  
  4336.    o  GSS_S_BAD_NAMETYPE indicates that the input_name parameter contained
  4337.       an invalid name type or a name type unsupported by the GSS-API
  4338.       implementation.
  4339.  
  4340.    o  GSS_S_FAILURE indicates that the requested operation could not
  4341.       be performed for reasons unspecified at the GSS-API level.
  4342.  
  4343.    This routine returns the mechanism set with which the input_name may
  4344.    be processed.
  4345.  
  4346.    Each mechanism returned will recognize at least one element within
  4347.    the name. It is permissible for this routine to be implemented within
  4348.    a mechanism-independent GSS-API layer, using the type information
  4349.    contained within the presented name, and based on registration
  4350.    information provided by individual mechanism implementations.  This
  4351.    means that the returned mech_types result may indicate that a
  4352.    particular mechanism will understand a particular name when in fact
  4353.    it would refuse to accept that name as input to
  4354.    GSS_Canonicalize_name(), GSS_Init_sec_context(), GSS_Acquire_cred(),
  4355.    or GSS_Add_cred(), due to some property of the particular name rather
  4356.    than a property of the name type.  Thus, this routine should be used
  4357.    only as a pre-filter for a call to a subsequent mechanism-specific
  4358.    routine.
  4359.  
  4360.  
  4361. 2.4.14: GSS_Canonicalize_name call
  4362.  
  4363.    Inputs:
  4364.  
  4365.    o  input_name INTERNAL NAME,
  4366.  
  4367.    o  mech_type OBJECT IDENTIFIER  -- must be explicit mechanism,
  4368.       not "default" specifier or identifier of negotiating mechanism
  4369.  
  4370.  
  4371.  
  4372.  
  4373. Linn               Document Expiration: 23 March 1998          [Page 73]
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379. Internet-Draft                                         23 September 1997
  4380.  
  4381.  
  4382.    Outputs:
  4383.  
  4384.    o  major_status INTEGER,
  4385.  
  4386.    o  minor_status INTEGER,
  4387.  
  4388.    o  output_name INTERNAL NAME  -- caller must release with
  4389.            -- GSS_Release_name()
  4390.  
  4391.    Return major_status codes:
  4392.  
  4393.    o  GSS_S_COMPLETE indicates that a mechanism-specific reduction of
  4394.       the input_name, as processed by the mechanism identified by
  4395.       mech_type, is available in output_name.
  4396.  
  4397.    o  GSS_S_BAD_MECH indicates that the identified mechanism is
  4398.       unsupported.
  4399.  
  4400.    o  GSS_S_BAD_NAMETYPE indicates that the input name does not
  4401.       contain an element with suitable type for processing by the
  4402.       identified mechanism.
  4403.  
  4404.    o  GSS_S_BAD_NAME indicates that the input name contains an
  4405.       element with suitable type for processing by the identified
  4406.       mechanism, but that this element could not be processed
  4407.       successfully.
  4408.  
  4409.    o  GSS_S_FAILURE indicates that the requested operation could not
  4410.       be performed for reasons unspecified at the GSS-API level.
  4411.  
  4412.    This routine reduces a GSS-API internal name input_name, which may in
  4413.    general contain elements corresponding to multiple mechanisms, to a
  4414.    mechanism-specific Mechanism Name (MN) output_name by applying the
  4415.    translations corresponding to the mechanism identified by mech_type.
  4416.    The contents of input_name are unaffected by the
  4417.    GSS_Canonicalize_name() operation.  References to output_name will
  4418.    remain valid until output_name is released, independent of whether or
  4419.    not input_name is subsequently released.
  4420.  
  4421. 2.4.15: GSS_Export_name call
  4422.  
  4423.    Inputs:
  4424.  
  4425.    o  input_name INTERNAL NAME, -- required to be MN
  4426.  
  4427.    Outputs:
  4428.  
  4429.    o  major_status INTEGER,
  4430.  
  4431.  
  4432.  
  4433. Linn               Document Expiration: 23 March 1998          [Page 74]
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439. Internet-Draft                                         23 September 1997
  4440.  
  4441.  
  4442.    o  minor_status INTEGER,
  4443.  
  4444.    o  output_name OCTET STRING  -- caller must release
  4445.            -- with GSS_Release_buffer()
  4446.  
  4447.    Return major_status codes:
  4448.  
  4449.    o  GSS_S_COMPLETE indicates that a flat representation of the
  4450.       input name is available in output_name.
  4451.  
  4452.    o  GSS_S_NAME_NOT_MN indicates that the input name contained
  4453.       elements corresponding to multiple mechanisms, so cannot
  4454.       be exported into a single-mechanism flat form.
  4455.  
  4456.    o  GSS_S_BAD_NAME indicates that the input name was an MN,
  4457.       but could not be processed.
  4458.  
  4459.    o  GSS_S_BAD_NAMETYPE indicates that the input name was an MN,
  4460.       but that its type is unsupported by the GSS-API implementation.
  4461.  
  4462.    o  GSS_S_FAILURE indicates that the requested operation could not
  4463.       be performed for reasons unspecified at the GSS-API level.
  4464.  
  4465.    This routine creates a flat name representation, suitable for
  4466.    bytewise comparison or for input to GSS_Import_name() in conjunction
  4467.    with the reserved GSS-API Exported Name Object OID, from a internal-
  4468.    form Mechanism Name (MN) as emitted, e.g., by GSS_Canonicalize_name()
  4469.    or GSS_Accept_sec_context().
  4470.  
  4471.    The emitted GSS-API Exported Name Object is self-describing; no
  4472.    associated parameter-level OID need be emitted by this call.  This
  4473.    flat representation consists of a mechanism-independent wrapper
  4474.    layer, defined in Section 3.2 of this document, enclosing a
  4475.    mechanism-defined name representation.
  4476.  
  4477.    In all cases, the flat name output by GSS_Export_name() to correspond
  4478.    to a particular input MN must be invariant over time within a
  4479.    particular installation.
  4480.  
  4481.    The GSS_S_NAME_NOT_MN status code is provided to enable
  4482.    implementations to reject input names which are not MNs.  It is not,
  4483.    however, required for purposes of conformance to this specification
  4484.    that all non-MN input names must necessarily be rejected.
  4485.  
  4486. 2.4.16: GSS_Duplicate_name call
  4487.  
  4488.    Inputs:
  4489.  
  4490.  
  4491.  
  4492.  
  4493. Linn               Document Expiration: 23 March 1998          [Page 75]
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499. Internet-Draft                                         23 September 1997
  4500.  
  4501.  
  4502.    o  src_name INTERNAL NAME
  4503.  
  4504.    Outputs:
  4505.  
  4506.    o  major_status INTEGER,
  4507.  
  4508.    o  minor_status INTEGER,
  4509.  
  4510.    o  dest_name INTERNAL NAME  -- caller must release
  4511.            -- with GSS_Release_name()
  4512.  
  4513.    Return major_status codes:
  4514.  
  4515.    o  GSS_S_COMPLETE indicates that dest_name references an internal
  4516.       name object containing the same name as passed to src_name.
  4517.  
  4518.    o  GSS_S_BAD_NAME indicates that the input name was invalid.
  4519.  
  4520.  
  4521.    o  GSS_S_FAILURE indicates that the requested operation could not
  4522.       be performed for reasons unspecified at the GSS-API level.
  4523.  
  4524.    This routine takes input internal name src_name, and returns another
  4525.    reference (dest_name) to that name which can be used even if src_name
  4526.    is later freed.  (Note: This may be implemented by copying or through
  4527.    use of reference counts.)
  4528.  
  4529. 3: Data Structure Definitions for GSS-V2 Usage
  4530.  
  4531.    Subsections of this section define, for interoperability and
  4532.    portability purposes, certain data structures for use with GSS-V2.
  4533.  
  4534. 3.1: Mechanism-Independent Token Format
  4535.  
  4536.    This section specifies a mechanism-independent level of encapsulating
  4537.    representation for the initial token of a GSS-API context
  4538.    establishment sequence, incorporating an identifier of the mechanism
  4539.    type to be used on that context and enabling tokens to be interpreted
  4540.    unambiguously at GSS-API peers. Use of this format is required for
  4541.    initial context establishment tokens of Internet standards-track
  4542.    GSS-API mechanisms; use in non-initial tokens is optional.
  4543.  
  4544.    The encoding format for the token tag is derived from ASN.1 and DER
  4545.    (per illustrative ASN.1 syntax included later within this
  4546.    subsection), but its concrete representation is defined directly in
  4547.    terms of octets rather than at the ASN.1 level in order to facilitate
  4548.    interoperable implementation without use of general ASN.1 processing
  4549.    code.  The token tag consists of the following elements, in order:
  4550.  
  4551.  
  4552.  
  4553. Linn               Document Expiration: 23 March 1998          [Page 76]
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559. Internet-Draft                                         23 September 1997
  4560.  
  4561.  
  4562.       1. 0x60 -- Tag for [APPLICATION 0] SEQUENCE; indicates that
  4563.       constructed form, definite length encoding follows.
  4564.  
  4565.       2. Token length octets, specifying length of subsequent data
  4566.       (i.e., the summed lengths of elements 3-5 in this list, and of
  4567.       the mechanism-defined token object following the tag).
  4568.       This element comprises a variable number of octets:
  4569.  
  4570.         2a. If the indicated value is less than 128, it shall be
  4571.         represented in a single octet with bit 8 (high order)
  4572.         set to "0" and the remaining bits representing the value.
  4573.  
  4574.         2b. If the indicated value is 128 or more, it shall be
  4575.         represented in two or more octets, with bit 8 of the first
  4576.         octet set to "1" and the remaining bits of the first octet
  4577.         specifying the number of additional octets.  The subsequent
  4578.         octets carry the value, 8 bits per octet, most significant
  4579.         digit first.  The minimum number of octets shall be used to
  4580.         encode the length (i.e., no octets representing leading zeros
  4581.         shall be included within the length encoding).
  4582.  
  4583.       3. 0x06 -- Tag for OBJECT IDENTIFIER
  4584.  
  4585.       4. Object identifier length -- length (number of octets) of
  4586.       the encoded object identifier contained in element 5, encoded
  4587.       per rules as described in 2a. and 2b. above.
  4588.  
  4589.       5. Object identifier octets -- variable number of octets,
  4590.       encoded per ASN.1 BER rules:
  4591.  
  4592.         5a. The first octet contains the sum of two values: (1) the
  4593.         top-level object identifier component, multiplied by 40 (decimal),
  4594.         and (2) the second-level object identifier component.  This
  4595.         special case is the only point within an object identifier
  4596.         encoding where a single octet represents contents of more
  4597.         than one component.
  4598.  
  4599.         5b. Subsequent octets, if required, encode successively-lower
  4600.         components in the represented object identifier.  A component's
  4601.         encoding may span multiple octets, encoding 7 bits per octet
  4602.         (most significant bits first) and with bit 8 set to "1" on
  4603.         all but the final octet in the component's encoding.  The
  4604.         minimum number of octets shall be used to encode each component
  4605.         (i.e., no octets representing leading zeros shall be included
  4606.         within a component's encoding).
  4607.  
  4608.       (Note: In many implementations, elements 3-5 may be stored and
  4609.       referenced as a contiguous string constant.)
  4610.  
  4611.  
  4612.  
  4613. Linn               Document Expiration: 23 March 1998          [Page 77]
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619. Internet-Draft                                         23 September 1997
  4620.  
  4621.  
  4622.    The token tag is immediately followed by a mechanism-defined token
  4623.    object.  Note that no independent size specifier intervenes following
  4624.    the object identifier value to indicate the size of the mechanism-
  4625.    defined token object.  While ASN.1 usage within mechanism-defined
  4626.    tokens is permitted, there is no requirement that the mechanism-
  4627.    specific innerContextToken, innerMsgToken, and sealedUserData data
  4628.    elements must employ ASN.1 BER/DER encoding conventions.
  4629.  
  4630.    The following ASN.1 syntax is included for descriptive purposes only,
  4631.    to illustrate structural relationships among token and tag objects.
  4632.    For interoperability purposes, token and tag encoding shall be
  4633.    performed using the concrete encoding procedures described earlier in
  4634.    this subsection.
  4635.  
  4636.        GSS-API DEFINITIONS ::=
  4637.  
  4638.        BEGIN
  4639.  
  4640.        MechType ::= OBJECT IDENTIFIER
  4641.        -- data structure definitions
  4642.  
  4643.        -- callers must be able to distinguish among
  4644.        -- InitialContextToken, SubsequentContextToken,
  4645.        -- PerMsgToken, and SealedMessage data elements
  4646.        -- based on the usage in which they occur
  4647.  
  4648.        InitialContextToken ::=
  4649.        -- option indication (delegation, etc.) indicated within
  4650.        -- mechanism-specific token
  4651.        [APPLICATION 0] IMPLICIT SEQUENCE {
  4652.                thisMech MechType,
  4653.                innerContextToken ANY DEFINED BY thisMech
  4654.                   -- contents mechanism-specific
  4655.                   -- ASN.1 structure not required
  4656.                }
  4657.  
  4658.        SubsequentContextToken ::= innerContextToken ANY
  4659.        -- interpretation based on predecessor InitialContextToken
  4660.        -- ASN.1 structure not required
  4661.  
  4662.        PerMsgToken ::=
  4663.        -- as emitted by GSS_GetMIC and processed by GSS_VerifyMIC
  4664.        -- ASN.1 structure not required
  4665.                innerMsgToken ANY
  4666.  
  4667.        SealedMessage ::=
  4668.        -- as emitted by GSS_Wrap and processed by GSS_Unwrap
  4669.        -- includes internal, mechanism-defined indicator
  4670.  
  4671.  
  4672.  
  4673. Linn               Document Expiration: 23 March 1998          [Page 78]
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679. Internet-Draft                                         23 September 1997
  4680.  
  4681.  
  4682.        -- of whether or not encrypted
  4683.        -- ASN.1 structure not required
  4684.                sealedUserData ANY
  4685.  
  4686.        END
  4687.  
  4688.  
  4689. 3.2: Mechanism-Independent Exported Name Object Format
  4690.  
  4691.    This section specifies a mechanism-independent level of encapsulating
  4692.    representation for names exported via the GSS_Export_name() call,
  4693.    including an object identifier representing the exporting mechanism.
  4694.    The format of names encapsulated via this representation shall be
  4695.    defined within individual mechanism drafts.  The Object Identifier
  4696.    value to indicate names of this type is defined in Section 4.7 of
  4697.    this document.
  4698.  
  4699.    No name type OID is included in this mechanism-independent level of
  4700.    format definition, since (depending on individual mechanism
  4701.    specifications) the enclosed name may be implicitly typed or may be
  4702.    explicitly typed using a means other than OID encoding.
  4703.  
  4704.    The bytes within MECH_OID_LEN and NAME_LEN elements are represented
  4705.    most significant byte first (equivalently, in IP network byte order).
  4706.  
  4707.         Length    Name          Description
  4708.  
  4709.         2               TOK_ID          Token Identifier
  4710.                                         For exported name objects, this
  4711.                                         must be hex 04 01.
  4712.         2               MECH_OID_LEN    Length of the Mechanism OID
  4713.         MECH_OID_LEN    MECH_OID        Mechanism OID, in DER
  4714.         4               NAME_LEN        Length of name
  4715.         NAME_LEN        NAME            Exported name; format defined in
  4716.                                         applicable mechanism draft.
  4717.  
  4718.    A concrete example of the contents of an exported name object, derived
  4719.    from the Kerberos Version 5 mechanism, is as follows:
  4720.  
  4721.    04 01 0B 00 06 09 2A 86 48 86 F7 12 01 02 02 lx xx xx xh pp qq ... zz
  4722.  
  4723.    04 01        mandatory token identifier
  4724.  
  4725.    0B 00        2-byte length of the immediately following DER-encoded
  4726.                 ASN.1 value of type OID, least significant octet first
  4727.  
  4728.    06 09 2A 86 48 86 F7 12 01 02 02    DER-encoded ASN.1 value of type OID
  4729.  
  4730.  
  4731.  
  4732.  
  4733. Linn               Document Expiration: 23 March 1998          [Page 79]
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739. Internet-Draft                                         23 September 1997
  4740.  
  4741.  
  4742.           in Detail:      06                           Identifier octet (6=OID)
  4743.                           09                           Length octet(s)
  4744.                           2A 86 48 86 F7 12 01 02 02   Content octet(s)
  4745.  
  4746.    lx xx xx xh   4-byte length of the immediately following exported
  4747.                  name blob, least significant octet first
  4748.  
  4749.    pp qq ... zz  exported name blob of specified length,
  4750.                  bits and bytes specified in the
  4751.                     (Kerberos 5) GSS-API v2 mechanism spec
  4752.  
  4753. 4: Name Type Definitions
  4754.  
  4755.    This section includes definitions for name types and associated
  4756.    syntaxes which are defined in a mechanism-independent fashion at the
  4757.    GSS-API level rather than being defined in individual mechanism
  4758.    specifications.
  4759.  
  4760. 4.1: Host-Based Service Name Form
  4761.  
  4762.    This name form shall be represented by the Object Identifier:
  4763.  
  4764.    {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
  4765.    "gssapi(2) generic(1) service_name(4)}.
  4766.  
  4767.    The recommended symbolic name for this type is
  4768.    "GSS_C_NT_HOSTBASED_SERVICE".
  4769.  
  4770.    For reasons of compatibility with existing implementations, it is
  4771.    recommended that this OID be used rather than the alternate value as
  4772.    included in RFC-2078:
  4773.  
  4774.    {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
  4775.    2(gss-host-based-services)}
  4776.  
  4777.    While it is not recommended that this alternate value be emitted on
  4778.    output by GSS implementations, it is recommended that it be accepted
  4779.    on input as equivalent to the recommended value.
  4780.  
  4781.    This name type is used to represent services associated with host
  4782.    computers.  Support for this name form is recommended to mechanism
  4783.    designers in the interests of portability, but is not mandated by
  4784.    this specification. This name form is constructed using two elements,
  4785.    "service" and "hostname", as follows:
  4786.  
  4787.    service@hostname
  4788.  
  4789.    When a reference to a name of this type is resolved, the "hostname"
  4790.  
  4791.  
  4792.  
  4793. Linn               Document Expiration: 23 March 1998          [Page 80]
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799. Internet-Draft                                         23 September 1997
  4800.  
  4801.  
  4802.    may (as an example implementation strategy) be canonicalized by
  4803.    attempting a DNS lookup and using the fully-qualified domain name
  4804.    which is returned, or by using the "hostname" as provided if the DNS
  4805.    lookup fails.  The canonicalization operation also maps the host's
  4806.    name into lower-case characters.
  4807.  
  4808.    The "hostname" element may be omitted. If no "@" separator is
  4809.    included, the entire name is interpreted as the service specifier,
  4810.    with the "hostname" defaulted to the canonicalized name of the local
  4811.    host.
  4812.  
  4813.    Values for the "service" element are registered with the IANA.
  4814.  
  4815. 4.2: User Name Form
  4816.  
  4817.    This name form shall be represented by the Object Identifier {iso(1)
  4818.    member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
  4819.    generic(1) user_name(1)}. The recommended mechanism-independent
  4820.    symbolic name for this type is "GSS_C_NT_USER_NAME". (Note: the same
  4821.    name form and OID is defined within the Kerberos V5 GSS-API
  4822.    mechanism, but the symbolic name recommended there begins with a
  4823.    "GSS_KRB5_NT_" prefix.)
  4824.  
  4825.    This name type is used to indicate a named user on a local system.
  4826.    Its syntax and interpretation may be OS-specific. This name form is
  4827.    constructed as:
  4828.  
  4829.    username
  4830.  
  4831.  
  4832. 4.3: Machine UID Form
  4833.  
  4834.    This name form shall be represented by the Object Identifier {iso(1)
  4835.    member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
  4836.    generic(1) machine_uid_name(2)}.  The recommended mechanism-
  4837.    independent symbolic name for this type is
  4838.    "GSS_C_NT_MACHINE_UID_NAME".  (Note: the same name form and OID is
  4839.    defined within the Kerberos V5 GSS-API mechanism, but the symbolic
  4840.    name recommended there begins with a "GSS_KRB5_NT_" prefix.)
  4841.  
  4842.    This name type is used to indicate a numeric user identifier
  4843.    corresponding to a user on a local system.  Its interpretation is
  4844.    OS-specific.  The gss_buffer_desc representing a name of this type
  4845.    should contain a locally-significant user ID, represented in host
  4846.    byte order.  The GSS_Import_name() operation resolves this uid into a
  4847.    username, which is then treated as the User Name Form.
  4848.  
  4849. 4.4: String UID Form
  4850.  
  4851.  
  4852.  
  4853. Linn               Document Expiration: 23 March 1998          [Page 81]
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859. Internet-Draft                                         23 September 1997
  4860.  
  4861.  
  4862.    This name form shall be represented by the Object Identifier {iso(1)
  4863.    member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)
  4864.    generic(1) string_uid_name(3)}.  The recommended symbolic name for
  4865.    this type is "GSS_C_NT_STRING_UID_NAME".  (Note: the same name form
  4866.    and OID is defined within the Kerberos V5 GSS-API mechanism, but the
  4867.    symbolic name recommended there begins with a "GSS_KRB5_NT_" prefix.)
  4868.  
  4869.    This name type is used to indicate a string of digits representing
  4870.    the numeric user identifier of a user on a local system.  Its
  4871.    interpretation is OS-specific. This name type is similar to the
  4872.    Machine UID Form, except that the buffer contains a string
  4873.    representing the user ID.
  4874.  
  4875. 4.5: Anonymous Nametype
  4876.  
  4877.    The following Object Identifier value is provided as a means to
  4878.    identify anonymous names, and can be compared against in order to
  4879.    determine, in a mechanism-independent fashion, whether a name refers
  4880.    to an anonymous principal:
  4881.  
  4882.    {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
  4883.    3(gss-anonymous-name)}
  4884.  
  4885.    The recommended symbolic name corresponding to this definition is
  4886.    GSS_C_NT_ANONYMOUS.
  4887.  
  4888. 4.6: GSS_C_NO_OID
  4889.  
  4890.    The recommended symbolic name GSS_C_NO_OID corresponds to a null
  4891.    input value instead of an actual object identifier.  Where specified,
  4892.    it indicates interpretation of an associated name based on a
  4893.    mechanism-specific default printable syntax.
  4894.  
  4895. 4.7: Exported Name Object
  4896.  
  4897.    Name objects of the Mechanism-Independent Exported Name Object type,
  4898.    as defined in Section 3.2 of this document, will be identified with
  4899.    the following Object Identifier:
  4900.  
  4901.    {1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
  4902.    4(gss-api-exported-name)}
  4903.  
  4904.    The recommended symbolic name corresponding to this definition is
  4905.    GSS_C_NT_EXPORT_NAME.
  4906.  
  4907. 5:  Mechanism-Specific Example Scenarios
  4908.  
  4909.    This section provides illustrative overviews of the use of various
  4910.  
  4911.  
  4912.  
  4913. Linn               Document Expiration: 23 March 1998          [Page 82]
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919. Internet-Draft                                         23 September 1997
  4920.  
  4921.  
  4922.    candidate mechanism types to support the GSS-API. These discussions
  4923.    are intended primarily for readers familiar with specific security
  4924.    technologies, demonstrating how GSS-API functions can be used and
  4925.    implemented by candidate underlying mechanisms. They should not be
  4926.    regarded as constrictive to implementations or as defining the only
  4927.    means through which GSS-API functions can be realized with a
  4928.    particular underlying technology, and do not demonstrate all GSS-API
  4929.    features with each technology.
  4930.  
  4931. 5.1: Kerberos V5, single-TGT
  4932.  
  4933.    OS-specific login functions yield a TGT to the local realm Kerberos
  4934.    server; TGT is placed in a credentials structure for the client.
  4935.    Client calls GSS_Acquire_cred()  to acquire a cred_handle in order to
  4936.    reference the credentials for use in establishing security contexts.
  4937.  
  4938.    Client calls GSS_Init_sec_context().  If the requested service is
  4939.    located in a different realm, GSS_Init_sec_context()  gets the
  4940.    necessary TGT/key pairs needed to traverse the path from local to
  4941.    target realm; these data are placed in the owner's TGT cache. After
  4942.    any needed remote realm resolution, GSS_Init_sec_context()  yields a
  4943.    service ticket to the requested service with a corresponding session
  4944.    key; these data are stored in conjunction with the context. GSS-API
  4945.    code sends KRB_TGS_REQ request(s) and receives KRB_TGS_REP
  4946.    response(s) (in the successful case) or KRB_ERROR.
  4947.  
  4948.    Assuming success, GSS_Init_sec_context()  builds a Kerberos-formatted
  4949.    KRB_AP_REQ message, and returns it in output_token.  The client sends
  4950.    the output_token to the service.
  4951.  
  4952.    The service passes the received token as the input_token argument to
  4953.    GSS_Accept_sec_context(),  which verifies the authenticator, provides
  4954.    the service with the client's authenticated name, and returns an
  4955.    output_context_handle.
  4956.  
  4957.    Both parties now hold the session key associated with the service
  4958.    ticket, and can use this key in subsequent GSS_GetMIC(),
  4959.    GSS_VerifyMIC(),  GSS_Wrap(), and GSS_Unwrap() operations.
  4960.  
  4961. 5.2: Kerberos V5, double-TGT
  4962.  
  4963.    TGT acquisition as above.
  4964.  
  4965.    Note: To avoid unnecessary frequent invocations of error paths when
  4966.    implementing the GSS-API atop Kerberos V5, it seems appropriate to
  4967.    represent "single-TGT K-V5" and "double-TGT K-V5" with separate
  4968.    mech_types, and this discussion makes that assumption.
  4969.  
  4970.  
  4971.  
  4972.  
  4973. Linn               Document Expiration: 23 March 1998          [Page 83]
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979. Internet-Draft                                         23 September 1997
  4980.  
  4981.  
  4982.    Based on the (specified or defaulted) mech_type,
  4983.    GSS_Init_sec_context()  determines that the double-TGT protocol
  4984.    should be employed for the specified target. GSS_Init_sec_context()
  4985.    returns GSS_S_CONTINUE_NEEDED major_status, and its returned
  4986.    output_token contains a request to the service for the service's TGT.
  4987.    (If a service TGT with suitably long remaining lifetime already
  4988.    exists in a cache, it may be usable, obviating the need for this
  4989.    step.) The client passes the output_token to the service.  Note: this
  4990.    scenario illustrates a different use for the GSS_S_CONTINUE_NEEDED
  4991.    status return facility than for support of mutual authentication;
  4992.    note that both uses can coexist as successive operations within a
  4993.    single context establishment operation.
  4994.  
  4995.    The service passes the received token as the input_token argument to
  4996.    GSS_Accept_sec_context(),  which recognizes it as a request for TGT.
  4997.    (Note that current Kerberos V5 defines no intra-protocol mechanism to
  4998.    represent such a request.) GSS_Accept_sec_context()  returns
  4999.    GSS_S_CONTINUE_NEEDED major_status and provides the service's TGT in
  5000.    its output_token. The service sends the output_token to the client.
  5001.  
  5002.    The client passes the received token as the input_token argument to a
  5003.    continuation of GSS_Init_sec_context(). GSS_Init_sec_context()
  5004.    caches the received service TGT and uses it as part of a service
  5005.    ticket request to the Kerberos authentication server, storing the
  5006.    returned service ticket and session key in conjunction with the
  5007.    context. GSS_Init_sec_context()  builds a Kerberos-formatted
  5008.    authenticator, and returns it in output_token along with
  5009.    GSS_S_COMPLETE return major_status. The client sends the output_token
  5010.    to the service.
  5011.  
  5012.    Service passes the received token as the input_token argument to a
  5013.    continuation call to GSS_Accept_sec_context().
  5014.    GSS_Accept_sec_context()  verifies the authenticator, provides the
  5015.    service with the client's authenticated name, and returns
  5016.    major_status GSS_S_COMPLETE.
  5017.  
  5018.    GSS_GetMIC(),  GSS_VerifyMIC(), GSS_Wrap(), and GSS_Unwrap()  as
  5019.    above.
  5020.  
  5021. 5.3:  X.509 Authentication Framework
  5022.  
  5023.    This example illustrates use of the GSS-API in conjunction with
  5024.    public-key mechanisms, consistent with the X.509 Directory
  5025.    Authentication Framework.
  5026.  
  5027.    The GSS_Acquire_cred()  call establishes a credentials structure,
  5028.    making the client's private key accessible for use on behalf of the
  5029.    client.
  5030.  
  5031.  
  5032.  
  5033. Linn               Document Expiration: 23 March 1998          [Page 84]
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039. Internet-Draft                                         23 September 1997
  5040.  
  5041.  
  5042.    The client calls GSS_Init_sec_context(),  which interrogates the
  5043.    Directory to acquire (and validate) a chain of public-key
  5044.    certificates, thereby collecting the public key of the service.  The
  5045.    certificate validation operation determines that suitable integrity
  5046.    checks were applied by trusted authorities and that those
  5047.    certificates have not expired. GSS_Init_sec_context()  generates a
  5048.    secret key for use in per-message protection operations on the
  5049.    context, and enciphers that secret key under the service's public
  5050.    key.
  5051.  
  5052.    The enciphered secret key, along with an authenticator quantity
  5053.    signed with the client's private key, is included in the output_token
  5054.    from GSS_Init_sec_context().  The output_token also carries a
  5055.    certification path, consisting of a certificate chain leading from
  5056.    the service to the client; a variant approach would defer this path
  5057.    resolution to be performed by the service instead of being asserted
  5058.    by the client. The client application sends the output_token to the
  5059.    service.
  5060.  
  5061.    The service passes the received token as the input_token argument to
  5062.    GSS_Accept_sec_context().  GSS_Accept_sec_context() validates the
  5063.    certification path, and as a result determines a certified binding
  5064.    between the client's distinguished name and the client's public key.
  5065.    Given that public key, GSS_Accept_sec_context() can process the
  5066.    input_token's authenticator quantity and verify that the client's
  5067.    private key was used to sign the input_token. At this point, the
  5068.    client is authenticated to the service. The service uses its private
  5069.    key to decipher the enciphered secret key provided to it for per-
  5070.    message protection operations on the context.
  5071.  
  5072.    The client calls GSS_GetMIC()  or GSS_Wrap() on a data message, which
  5073.    causes per-message authentication, integrity, and (optional)
  5074.    confidentiality facilities to be applied to that message. The service
  5075.    uses the context's shared secret key to perform corresponding
  5076.    GSS_VerifyMIC()  and GSS_Unwrap() calls.
  5077.  
  5078. 6:  Security Considerations
  5079.  
  5080.    Security issues are discussed throughout this memo.
  5081.  
  5082. 7:  Related Activities
  5083.  
  5084.    In order to implement the GSS-API atop existing, emerging, and future
  5085.    security mechanisms:
  5086.  
  5087.       object identifiers must be assigned to candidate GSS-API
  5088.       mechanisms and the name types which they support
  5089.  
  5090.  
  5091.  
  5092.  
  5093. Linn               Document Expiration: 23 March 1998          [Page 85]
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099. Internet-Draft                                         23 September 1997
  5100.  
  5101.  
  5102.       concrete data element formats and processing procedures must be
  5103.       defined for candidate mechanisms
  5104.  
  5105.    Calling applications must implement formatting conventions which will
  5106.    enable them to distinguish GSS-API tokens from other data carried in
  5107.    their application protocols.
  5108.  
  5109.    Concrete language bindings are required for the programming
  5110.    environments in which the GSS-API is to be employed, as RFC-1509
  5111.    defines for the C programming language and GSS-V1.
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153. Linn               Document Expiration: 23 March 1998          [Page 86]
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159. Internet-Draft                                         23 September 1997
  5160.  
  5161.  
  5162.                                APPENDIX A
  5163.  
  5164.  
  5165.                       MECHANISM DESIGN CONSTRAINTS
  5166.  
  5167. The following constraints on GSS-API mechanism designs are adopted in
  5168. response to observed caller protocol requirements, and adherence thereto
  5169. is anticipated in subsequent descriptions of GSS-API mechanisms to be
  5170. documented in standards-track Internet specifications.
  5171.  
  5172. It is strongly recommended that mechanisms offering per-message
  5173. protection services also offer at least one of the replay detection and
  5174. sequencing services, as mechanisms offering neither of the latter will
  5175. fail to satisfy recognized requirements of certain candidate caller
  5176. protocols.
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213. Linn               Document Expiration: 23 March 1998          [Page 87]
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219. Internet-Draft                                         23 September 1997
  5220.  
  5221.  
  5222.                                APPENDIX B
  5223.  
  5224.  
  5225.                        COMPATIBILITY WITH GSS-V1
  5226.  
  5227.  
  5228. It is the intent of this document to define an interface and procedures
  5229. which preserve compatibility between GSS-V1 (RFC-1508) callers and GSS-
  5230. V2 providers.  All calls defined in GSS-V1 are preserved, and it has
  5231. been a goal that GSS-V1 callers should be able to operate atop GSS-V2
  5232. provider implementations.  Certain detailed changes, summarized in this
  5233. section, have been made in order to resolve omissions identified in
  5234. GSS-V1.
  5235.  
  5236. The following GSS-V1 constructs, while supported within GSS-V2, are
  5237. deprecated:
  5238.  
  5239.      Names for per-message processing routines: GSS_Seal() deprecated in
  5240.      favor of GSS_Wrap(); GSS_Sign() deprecated in favor of
  5241.      GSS_GetMIC(); GSS_Unseal() deprecated in favor of GSS_Unwrap();
  5242.      GSS_Verify() deprecated in favor of GSS_VerifyMIC().
  5243.  
  5244.      GSS_Delete_sec_context() facility for context_token usage, allowing
  5245.      mechanisms to signal context deletion, is retained for
  5246.      compatibility with GSS-V1.  For current usage, it is recommended
  5247.      that both peers to a context invoke GSS_Delete_sec_context()
  5248.      independently, passing a null output_context_token buffer to
  5249.      indicate that no context_token is required.  Implementations of
  5250.      GSS_Delete_sec_context() should delete relevant locally-stored
  5251.      context information.
  5252.  
  5253. This GSS-V2 specification adds the following calls which are not present
  5254. in GSS-V1:
  5255.  
  5256.      Credential management calls: GSS_Add_cred(),
  5257.      GSS_Inquire_cred_by_mech().
  5258.  
  5259.      Context-level calls:  GSS_Inquire_context(), GSS_Wrap_size_limit(),
  5260.      GSS_Export_sec_context(), GSS_Import_sec_context().
  5261.  
  5262.      Per-message calls:  No new calls.  Existing calls have been
  5263.      renamed.
  5264.  
  5265.      Support calls:  GSS_Create_empty_OID_set(),
  5266.      GSS_Add_OID_set_member(), GSS_Test_OID_set_member(),
  5267.      GSS_Inquire_names_for_mech(), GSS_Inquire_mechs_for_name(),
  5268.      GSS_Canonicalize_name(), GSS_Export_name(), GSS_Duplicate_name().
  5269.  
  5270.  
  5271.  
  5272.  
  5273. Linn               Document Expiration: 23 March 1998          [Page 88]
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279. Internet-Draft                                         23 September 1997
  5280.  
  5281.  
  5282. This GSS-V2 specification introduces three new facilities applicable to
  5283. security contexts, indicated using the following context state values
  5284. which are not present in GSS-V1:
  5285.  
  5286.      anon_state, set TRUE to indicate that a context's initiator is
  5287.      anonymous from the viewpoint of the target; Section 1.2.5 of this
  5288.      specification provides a summary description of the GSS-V2
  5289.      anonymity support facility, support and use of which is optional.
  5290.  
  5291.      prot_ready_state, set TRUE to indicate that a context may be used
  5292.      for per-message protection before final completion of context
  5293.      establishment; Section 1.2.7 of this specification provides a
  5294.      summary description of the GSS-V2 facility enabling mechanisms to
  5295.      selectively permit per-message protection during context
  5296.      establishment, support and use of which is optional.
  5297.  
  5298.      trans_state, set TRUE to indicate that a context is transferable to
  5299.      another process using the GSS-V2 GSS_Export_sec_context() facility.
  5300.  
  5301. These state values are represented (at the C bindings level) in
  5302. positions within a bit vector which are unused in GSS-V1, and may be
  5303. safely ignored by GSS-V1 callers.
  5304.  
  5305. Relative to GSS-V1, GSS-V2 provides additional guidance to GSS-API
  5306. implementors in the following areas: implementation robustness,
  5307. credential management, behavior in multi-mechanism configurations,
  5308. naming support, and inclusion of optional sequencing services.  The
  5309. token tagging facility as defined in GSS-V2, Section 3.1, is now
  5310. described directly in terms of octets to facilitate interoperable
  5311. implementation without general ASN.1 processing code; the corresponding
  5312. ASN.1 syntax, included for descriptive purposes, is unchanged from that
  5313. in GSS-V1. For use in conjunction with added naming support facilities,
  5314. a new Exported Name Object construct is added.  Additional name types
  5315. are introduced in Section 4.
  5316.  
  5317. This GSS-V2 specification adds the following major_status values which
  5318. are not defined in GSS-V1:
  5319.  
  5320.      GSS_S_BAD_QOP                 unsupported QOP value
  5321.      GSS_S_UNAUTHORIZED            operation unauthorized
  5322.      GSS_S_UNAVAILABLE             operation unavailable
  5323.      GSS_S_DUPLICATE_ELEMENT       duplicate credential element requested
  5324.      GSS_S_NAME_NOT_MN             name contains multi-mechanism elements
  5325.      GSS_S_GAP_TOKEN               skipped predecessor token(s)
  5326.                                     detected
  5327.  
  5328. Of these added status codes, only two values are defined to be
  5329. returnable by calls existing in GSS-V1: GSS_S_BAD_QOP (returnable by
  5330.  
  5331.  
  5332.  
  5333. Linn               Document Expiration: 23 March 1998          [Page 89]
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339. Internet-Draft                                         23 September 1997
  5340.  
  5341.  
  5342. GSS_GetMIC() and GSS_Wrap()), and GSS_S_GAP_TOKEN (returnable by
  5343. GSS_VerifyMIC() and GSS_Unwrap()).
  5344.  
  5345. Additionally, GSS-V2 descriptions of certain calls present in GSS-V1
  5346. have been updated to allow return of additional major_status values from
  5347. the set as defined in GSS-V1:  GSS_Inquire_cred() has
  5348. GSS_S_DEFECTIVE_CREDENTIAL and GSS_S_CREDENTIALS_EXPIRED defined as
  5349. returnable, GSS_Init_sec_context() has GSS_S_OLD_TOKEN,
  5350. GSS_S_DUPLICATE_TOKEN, and GSS_S_BAD_MECH defined as returnable, and
  5351. GSS_Accept_sec_context() has GSS_S_BAD_MECH defined as returnable.
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393. Linn               Document Expiration: 23 March 1998          [Page 90]
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399. Internet-Draft                                         23 September 1997
  5400.  
  5401.  
  5402. AUTHOR'S ADDRESS
  5403.  
  5404. John Linn
  5405.  
  5406. E-mail: linn@world.std.com
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453. Linn               Document Expiration: 23 March 1998          [Page 91]
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459. Internet-Draft                                         23 September 1997
  5460.  
  5461.  
  5462.                            TABLE OF CONTENTS
  5463.  
  5464. 1: GSS-API Characteristics and Concepts
  5465. 1.1: GSS-API Constructs
  5466. 1.1.1:  Credentials
  5467. 1.1.1.1: Credential Constructs and Concepts
  5468. 1.1.1.2: Credential Management
  5469. 1.1.1.3: Default Credential Resolution
  5470. 1.1.2: Tokens
  5471. 1.1.3:  Security Contexts
  5472. 1.1.4:  Mechanism Types
  5473. 1.1.5:  Naming
  5474. 1.1.6:  Channel Bindings
  5475. 1.2:  GSS-API Features and Issues
  5476. 1.2.1:  Status Reporting
  5477. 1.2.2: Per-Message Security Service Availability
  5478. 1.2.3: Per-Message Replay Detection and Sequencing
  5479. 1.2.4:  Quality of Protection
  5480. 1.2.5: Anonymity Support
  5481. 1.2.6: Initialization
  5482. 1.2.7: Per-Message Protection During Context Establishment
  5483. 1.2.8: Implementation Robustness
  5484. 2:  Interface Descriptions
  5485. 2.1:  Credential management calls
  5486. 2.1.1:  GSS_Acquire_cred call
  5487. 2.1.2:  GSS_Release_cred call
  5488. 2.1.3:  GSS_Inquire_cred call
  5489. 2.1.4:  GSS_Add_cred call
  5490. 2.1.5:  GSS_Inquire_cred_by_mech call
  5491. 2.2:  Context-level calls
  5492. 2.2.1:  GSS_Init_sec_context call
  5493. 2.2.2:  GSS_Accept_sec_context call
  5494. 2.2.3:  GSS_Delete_sec_context call
  5495. 2.2.4:  GSS_Process_context_token call
  5496. 2.2.5:  GSS_Context_time call
  5497. 2.2.6:  GSS_Inquire_context call
  5498. 2.2.7:  GSS_Wrap_size_limit call
  5499. 2.2.8:  GSS_Export_sec_context call
  5500. 2.2.9:  GSS_Import_sec_context call
  5501. 2.3:  Per-message calls
  5502. 2.3.1:  GSS_GetMIC call
  5503. 2.3.2:  GSS_VerifyMIC call
  5504. 2.3.3:  GSS_Wrap call
  5505. 2.3.4:  GSS_Unwrap call
  5506. 2.4:  Support calls
  5507. 2.4.1:  GSS_Display_status call
  5508. 2.4.2:  GSS_Indicate_mechs call
  5509. 2.4.3:  GSS_Compare_name call
  5510.  
  5511.  
  5512.  
  5513. Linn               Document Expiration: 23 March 1998          [Page 92]
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519. Internet-Draft                                         23 September 1997
  5520.  
  5521.  
  5522. 2.4.4:  GSS_Display_name call
  5523. 2.4.5:  GSS_Import_name call
  5524. 2.4.6:  GSS_Release_name call
  5525. 2.4.7:  GSS_Release_buffer call
  5526. 2.4.8:  GSS_Release_OID_set call
  5527. 2.4.9:  GSS_Create_empty_OID_set call
  5528. 2.4.10: GSS_Add_OID_set_member call
  5529. 2.4.11: GSS_Test_OID_set_member call
  5530. 2.4.12: GSS_Inquire_names_for_mech call
  5531. 2.4.13: GSS_Inquire_mechs_for_name call
  5532. 2.4.14: GSS_Canonicalize_name call
  5533. 2.4.15: GSS_Export_name call
  5534. 2.4.16: GSS_Duplicate_name call
  5535. 3: Data Structure Definitions for GSS-V2 Usage
  5536. 3.1: Mechanism-Independent Token Format
  5537. 3.2: Mechanism-Independent Exported Name Object Format
  5538. 4: Name Type Definitions
  5539. 4.1: Host-Based Service Name Form
  5540. 4.2: User Name Form
  5541. 4.3: Machine UID Form
  5542. 4.4: String UID Form
  5543. 5:  Mechanism-Specific Example Scenarios
  5544. 5.1: Kerberos V5, single-TGT
  5545. 5.2: Kerberos V5, double-TGT
  5546. 5.3:  X.509 Authentication Framework
  5547. 6:  Security Considerations
  5548. 7:  Related Activities
  5549. Appendix A: Mechanism Design Constraints
  5550. Appendix B: Compatibility with GSS-V1
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573. Linn               Document Expiration: 23 March 1998          [Page 93]
  5574.  
  5575.  
  5576.