Contents

gss_acquire_cred(_:_:_:_:_:_:_:_:)

Acquires a credential for use in establishing a security context.

Declaration

func gss_acquire_cred(_ minor_status: UnsafeMutablePointer<OM_uint32>, _ desired_name: gss_name_t?, _ time_req: OM_uint32, _ desired_mechs: gss_OID_set?, _ cred_usage: gss_cred_usage_t, _ output_cred_handle: UnsafeMutablePointer<gss_cred_id_t?>, _ actual_mechs: UnsafeMutablePointer<gss_OID_set?>?, _ time_rec: UnsafeMutablePointer<OM_uint32>?) -> OM_uint32

Parameters

  • minor_status:

    A pointer to the secondary status result that provides additional information in case of failure.

  • desired_name:

    The name of the principal whose credential should be acquired. Specify GSS_C_NO_NAME to get a generic credential or use Gss_import_name(_:_:_:_:) to obtain a name object.

  • time_req:

    The time in seconds that the credential should remain valid. Use Gss_c_indefinite to indicate the maximum allowed duration.

  • desired_mechs:

    The set of underlying security mechanisms to use with the credential. Use GSS_C_NO_OID_SET to get the default set.

  • cred_usage:

    A flag that indicates how the credential will be used. Specify Gss_c_initiate for context initiation, Gss_c_accept for context acceptance, or Gss_c_both for both.

  • output_cred_handle:

    A pointer the function uses to return the credential. Release the credential’s memory with Gss_release_cred(_:_:) when you are done with it.

  • actual_mechs:

    A pointer the function uses to return the actual mechanisms used by the credential. Set to NULL to ignore this output. If you do receive a set of mechanisms, use Gss_release_oid_set(_:_:) to release its memory when you are done with it.

  • time_rec:

    A pointer the function uses to return the actual number of seconds for which the credential is valid. Set to NULL to ignore this output.

Mentioned in

Return Value

A status code set to GSS_S_COMPLETE on success. See Function Status for a description of other status outputs.

See Also

Acquisition