keyhole logo

Heimdal GSS-API functions


Functions

OM_uint32 GSSAPI_LIB_FUNCTION gss_add_oid_set_member (OM_uint32 *minor_status, const gss_OID member_oid, gss_OID_set *oid_set)
OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap_iov (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count)
OM_uint32 GSSAPI_LIB_FUNCTION gss_unwrap_iov (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, gss_qop_t *qop_state, gss_iov_buffer_desc *iov, int iov_count)
OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap_iov_length (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count)
OM_uint32 GSSAPI_LIB_FUNCTION gss_release_iov_buffer (OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count)
OM_uint32 GSSAPI_LIB_FUNCTION gss_canonicalize_name (OM_uint32 *minor_status, const gss_name_t input_name, const gss_OID mech_type, gss_name_t *output_name)
OM_uint32 GSSAPI_LIB_FUNCTION gss_release_cred (OM_uint32 *minor_status, gss_cred_id_t *cred_handle)

Detailed Description


Function Documentation

OM_uint32 GSSAPI_LIB_FUNCTION gss_add_oid_set_member ( OM_uint32 *  minor_status,
const gss_OID  member_oid,
gss_OID_set *  oid_set 
)

Add a oid to the oid set, function does not make a copy of the oid, so the pointer to member_oid needs to be stable for the whole time oid_set is used.

If there is a duplicate member of the oid, the new member is not added to to the set.

Parameters:
minor_status minor status code.
member_oid member to add to the oid set
oid_set oid set to add the member too
Returns:
a gss_error code, see gss_display_status() about printing the error code.

OM_uint32 GSSAPI_LIB_FUNCTION gss_canonicalize_name ( OM_uint32 *  minor_status,
const gss_name_t  input_name,
const gss_OID  mech_type,
gss_name_t *  output_name 
)

gss_canonicalize_name takes a Internal Name (IN) and converts in into a mechanism specific Mechanism Name (MN).

The input name may multiple name, or generic name types.

If the input_name if of the GSS_C_NT_USER_NAME, and the Kerberos mechanism is specified, the resulting MN type is a GSS_KRB5_NT_PRINCIPAL_NAME.

For more information about internalVSmechname.

Parameters:
minor_status minor status code.
input_name name to covert, unchanged by gss_canonicalize_name().
mech_type the type to convert Name too.
output_name the resulting type, release with gss_release_name(), independent of input_name.
Returns:
a gss_error code, see gss_display_status() about printing the error code.

OM_uint32 GSSAPI_LIB_FUNCTION gss_release_cred ( OM_uint32 *  minor_status,
gss_cred_id_t *  cred_handle 
)

Release a credentials

Its ok to release the GSS_C_NO_CREDENTIAL/NULL credential, it will return a GSS_S_COMPLETE error code. On return cred_handle is set ot GSS_C_NO_CREDENTIAL.

Example:

 gss_cred_id_t cred = GSS_C_NO_CREDENTIAL;
 major = gss_release_cred(&minor, &cred);

Parameters:
minor_status minor status return code, mech specific
cred_handle a pointer to the credential too release
Returns:
an gssapi error code

OM_uint32 GSSAPI_LIB_FUNCTION gss_release_iov_buffer ( OM_uint32 *  minor_status,
gss_iov_buffer_desc *  iov,
int  iov_count 
)

Free all buffer allocated by gss_wrap_iov() or gss_unwrap_iov() by looking at the GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATED flag.

OM_uint32 GSSAPI_LIB_FUNCTION gss_unwrap_iov ( OM_uint32 *  minor_status,
gss_ctx_id_t  context_handle,
int *  conf_state,
gss_qop_t *  qop_state,
gss_iov_buffer_desc *  iov,
int  iov_count 
)

Decrypt or verifies the signature on the data.

OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap_iov ( OM_uint32 *  minor_status,
gss_ctx_id_t  context_handle,
int  conf_req_flag,
gss_qop_t  qop_req,
int *  conf_state,
gss_iov_buffer_desc *  iov,
int  iov_count 
)

Encrypts or sign the data.

This is a more complicated version of gss_wrap(), it allows the caller to use AEAD data (signed header/trailer) and allow greater controll over where the encrypted data is placed.

The maximum packet size is gss_context_stream_sizes.max_msg_size.

The caller needs provide the folloing buffers when using in conf_req_flag=1 mode:

  • HEADER (of size gss_context_stream_sizes.header) { DATA or SIGN_ONLY } (optional, zero or more) PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) TRAILER (of size gss_context_stream_sizes.trailer)

  • on DCE-RPC mode, the caller can skip PADDING and TRAILER if the DATA elements is padded to a block bountry and header is of at least size gss_context_stream_sizes.header + gss_context_stream_sizes.trailer.

HEADER, PADDING, TRAILER will be shrunken to the size required to transmit any of them too large.

To generate gss_wrap() compatible packets, use: HEADER | DATA | PADDING | TRAILER

When used in conf_req_flag=0,

  • HEADER (of size gss_context_stream_sizes.header) { DATA or SIGN_ONLY } (optional, zero or more) PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) TRAILER (of size gss_context_stream_sizes.trailer)

The input sizes of HEADER, PADDING and TRAILER can be fetched using gss_wrap_iov_length() or gss_context_query_attributes().

OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap_iov_length ( OM_uint32 *  minor_status,
gss_ctx_id_t  context_handle,
int  conf_req_flag,
gss_qop_t  qop_req,
int *  conf_state,
gss_iov_buffer_desc *  iov,
int  iov_count 
)

Update the length fields in iov buffer for the types:

  • GSS_IOV_BUFFER_TYPE_HEADER
  • GSS_IOV_BUFFER_TYPE_PADDING
  • GSS_IOV_BUFFER_TYPE_TRAILER

Consider using gss_context_query_attributes() to fetch the data instead.


Generated on Sat Nov 21 07:44:41 2009 for HeimdalGSS-APIlibrary by doxygen 1.5.6