Next: , Previous: Standard GSS API, Up: Top


4 Extended GSS API

None of the following functions are standard GSS API functions. As such, they are not declared in gss/api.h, but rather in gss/ext.h (which is included from gss.h). See Header.

— Function: const char * gss_check_version (const char * req_version)

req_version: version string to compare with, or NULL

Check library version.

— Function: int gss_oid_equal (gss_OID first_oid, gss_OID second_oid)

first_oid: (Object ID, read) First Object identifier.

second_oid: (Object ID, read) First Object identifier.

Compare two OIDs for equality. The comparison is "deep", i.e., the actual byte sequences of the OIDs are compared instead of just the pointer equality.

— Function: OM_uint32 gss_copy_oid (OM_uint32 * minor_status, const gss_OID src_oid, gss_OID dest_oid)

minor_status: (integer, modify) Mechanism specific status code.

src_oid: (Object ID, read) The object identifier to copy.

dest_oid: (Object ID, modify) The resultant copy of @src_oid. Storage associated with this name must be freed by the application, but gss_release_oid() cannot be used generally as it deallocate the the oid structure itself too (use gss_duplicate_oid() if you don't want this problem.)

Make an exact copy of the given OID, that shares no memory areas with the original.

— Function: OM_uint32 gss_duplicate_oid (OM_uint32 * minor_status, const gss_OID src_oid, gss_OID * dest_oid)

minor_status: (integer, modify) Mechanism specific status code.

src_oid: (Object ID, read) The object identifier to duplicate.

dest_oid: (Object ID, modify) The resultant copy of @src_oid. Storage associated with this name must be freed by the application, by calling gss_release_oid().

Allocate a new OID and make it an exact copy of the given OID, that shares no memory areas with the original.

— Function: int gss_userok (const gss_name_t name, const char * username)

name: (gss_name_t, read) Name to be compared.

username: Zero terminated string with username.

Compare the username against the output from gss_export_name() invoked on @name, after removing the leading OID. This answers the question whether the particular mechanism would authenticate them as the same principal

— Function: int gss_encapsulate_token (gss_buffer_t input_message, gss_OID token_oid, gss_buffer_t output_message)

input_message: Message to be encapsulated.

token_oid: OID of mechanism.

input_message: Output buffer with encapsulated message.

Wrap a buffer in the mechanism-independent token format. This is used for the initial token of a GSS-API context establishment sequence. It incorporates an identifier of the mechanism type to be used on that context, and enables tokens to be interpreted unambiguously at GSS-API peers. See further section 3.1 of RFC 2743.

— Function: int gss_decapsulate_token (gss_buffer_t input_message, gss_OID token_oid, gss_buffer_t output_message)

input_message: Message to decapsulated.

token_oid: Output buffer with mechanism OID used in message.

input_message: Output buffer with encapsulated message.

Unwrap a buffer in the mechanism-independent token format. This is the reverse of gss_encapsulate_token. The translation is loss-less, all data is preserved as is.