GLOBUS_GSS_ASSIST_EXPORT_SEC_CONTEXT(3)

πŸ’– globus_gss_assist_accept_sec_context(3) πŸ’–

okay bestie, so this is a page from the Library Functions Manual, and it's literally all about globus_gss_assist_context β€” security context management, the whole vibe. grab a boba, we're getting into it πŸ§‹βœ¨


🌸 NAME 🌸

globus_gss_assist_context β€” Security Context Management

  • Security Context Creation and Use.

✨ SYNOPSIS ✨

πŸŽ€ Functions

  • globus_gss_assist_accept_sec_context β€” Accept a Security Context.
  • globus_gss_assist_accept_sec_context_async β€” Accept a Security Context Without Blocking.
  • globus_gss_assist_export_sec_context β€” (export the security context from a file)
  • globus_gss_assist_import_sec_context β€” (import the security context from a file)
  • globus_gss_assist_init_sec_context β€” (initialize a GSSAPI security connection)
  • globus_gss_assist_init_sec_context_async β€” (the async init, bestie)
  • globus_gss_assist_will_handle_restrictions β€” (check restrictions handling)
  • globus_gss_assist_get_unwrap β€” Get Unwrap.

here are the full signatures, copied exactly, no cap:

OM_uint32 globus_gss_assist_accept_sec_context (OM_uint32 *minor_status,
    gss_ctx_id_t *context_handle, const gss_cred_id_t cred_handle, char
    **src_name_char, OM_uint32 *ret_flags, int *user_to_user_flag, int
    *token_status, gss_cred_id_t *delegated_cred_handle,
    int(*gss_assist_get_token)(void *, void **, size_t *), void
    *gss_assist_get_context, int(*gss_assist_send_token)(void *, void *,
    size_t), void *gss_assist_send_context)
OM_uint32 globus_gss_assist_accept_sec_context_async (OM_uint32
    *minor_status, gss_ctx_id_t *context_handle, const gss_cred_id_t
    cred_handle, char **src_name_char, OM_uint32 *ret_flags, int
    *user_to_user_flag, void *input_buffer, size_t input_buffer_len,
    void **output_bufferp, size_t *output_buffer_lenp, gss_cred_id_t
    *delegated_cred_handle)
OM_uint32 globus_gss_assist_export_sec_context (OM_uint32 *minor_status,
    gss_ctx_id_t *context_handle, int *token_status, int fdp, FILE
    *fperr)
OM_uint32 globus_gss_assist_import_sec_context (OM_uint32 *minor_status,
    gss_ctx_id_t *context_handle, int *token_status, int fdp, FILE
    *fperr)
OM_uint32 globus_gss_assist_init_sec_context (OM_uint32 *minor_status,
    const gss_cred_id_t cred_handle, gss_ctx_id_t *context_handle, char
    *target_name_char, OM_uint32 req_flags, OM_uint32 *ret_flags, int
    *token_status, int(*gss_assist_get_token)(void *, void **, size_t
    *), void *gss_assist_get_context, int(*gss_assist_send_token)(void
    *, void *, size_t), void *gss_assist_send_context)
OM_uint32 globus_gss_assist_init_sec_context_async (OM_uint32
    *minor_status, const gss_cred_id_t cred_handle, gss_ctx_id_t
    *context_handle, char *target_name_char, OM_uint32 req_flags,
    OM_uint32 *ret_flags, void *input_buffer, size_t input_buffer_len,
    void **output_bufferp, size_t *output_buffer_lenp)
OM_uint32 globus_gss_assist_will_handle_restrictions (OM_uint32
    *minor_status, gss_ctx_id_t *context_handle)
OM_uint32 globus_gss_assist_get_unwrap (OM_uint32 *minor_status, const
    gss_ctx_id_t context_handle, char **data, size_t *length, int
    *token_status, int(*gss_assist_get_token)(void *, void **, size_t
    *), void *gss_assist_get_context, FILE *fperr)

πŸ¦‹ Detailed Description πŸ¦‹

Security Context Creation and Use. (yes that's the title AND the vibe, it's giving main character energy fr fr)

The functions in this section are used to create security contexts and send and receive messages sent over them. They use the functions provided by Token Transport or user-supplied functions to communicate security tokens over the context, looping over continue results from the GSSAPI as needed.


πŸ‘‘ Function Documentation πŸ‘‘

πŸ’… OM_uint32 globus_gss_assist_accept_sec_context

OM_uint32 globus_gss_assist_accept_sec_context (OM_uint32 * minor_status,
    gss_ctx_id_t * context_handle, const gss_cred_id_t cred_handle, char **
    src_name_char, OM_uint32 * ret_flags, int * user_to_user_flag, int *
    token_status, gss_cred_id_t * delegated_cred_handle, int(*
    gss_assist_get_token )(void *, void **, size_t *), void *
    gss_assist_get_context, int(* gss_assist_send_token )(void *, void *,
    size_t), void * gss_assist_send_context)

Accept a Security Context.

This routine accepts a GSSAPI security context and is called by the gram_gatekeeper. It isolates the GSSAPI from the rest of the gram code.

Initialize a GSSAPI security connection. Used by the server. The context_handle is returned, and there is one for each connection. This routine will take cake of the looping and token processing, using the supplied get_token and send_token routines.

Parameters

  • minor_status β€” GSSAPI return code
  • context_handle β€” pointer to returned context.
  • cred_handle β€” the cred handle obtained by acquire_cred.
  • src_name_char β€” Pointer to char string representation of the client which contacted the server. Maybe NULL if not wanted. Should be freed when done.
  • ret_flags β€” Pointer to which services are available after the connection is established. Maybe NULL if not wanted. We will also use this to pass in flags to the globus version of GSSAPI
  • user_to_user_flag β€” Pointer to flag to be set if the src_name is the same as our name. (Following are particular to this assist routine)
  • token_status β€” assist routine get/send token status
  • delegated_cred_handle β€” pointer to be set to the credential delegated by the client if delegation occurs during the security handshake
  • gss_assist_get_token β€” a get token routine
  • gss_assist_get_context β€” first arg for the get token routine
  • gss_assist_send_token β€” a send token routine
  • gss_assist_send_context β€” first arg for the send token routine

Returns

GSS_S_COMPLETE on success Other GSSAPI errors on failure.


🌈 OM_uint32 globus_gss_assist_accept_sec_context_async

OM_uint32 globus_gss_assist_accept_sec_context_async (OM_uint32 *
    minor_status, gss_ctx_id_t * context_handle, const gss_cred_id_t
    cred_handle, char ** src_name_char, OM_uint32 * ret_flags, int *
    user_to_user_flag, void * input_buffer, size_t input_buffer_len, void **
    output_bufferp, size_t * output_buffer_lenp, gss_cred_id_t *
    delegated_cred_handle)

Accept a Security Context Without Blocking.

This is an asynchronous version of the globus_gss_assist_accept_sec_context() function. Instead of looping itself it passes in and out the read and written buffers and the calling application is responsible for doing the I/O directly. (you're the main character now, you handle the I/O πŸ’…)

Parameters

  • minor_status β€” GSSAPI return code
  • context_handle β€” pointer to returned context.
  • cred_handle β€” the cred handle obtained by acquire_cred.
  • src_name_char β€” Pointer to char string representation of the client which contacted the server. Maybe NULL if not wanted. Should be freed when done.
  • ret_flags β€” Pointer to which services are available after the connection is established. Maybe NULL if not wanted. We will also use this to pass in flags to the Globus version of GSSAPI
  • user_to_user_flag β€” Pointer to flag to be set if the src_name is the same as our name.
  • input_buffer β€” pointer to a buffer received from peer.
  • input_buffer_len β€” length of the buffer input_buffer.
  • output_bufferp β€” pointer to a pointer which will be filled in with a pointer to an allocated block of memory. If non-NULL the contents of this block should be written to the peer where they will be fed into the globus_gss_assist_init_sec_context_async() function.
  • output_buffer_lenp β€” pointer to an integer which will be filled in with the length of the allocated output buffer pointed to by *output_bufferp.
  • delegated_cred_handle β€” pointer to be set to the credential delegated by the client if delegation occurs during the security handshake

Returns

GSS_S_COMPLETE on successful completion when this function does not need to be called again.

GSS_S_CONTINUE_NEEDED when *output_bufferp should be sent to the peer and a new input_buffer read and this function called again.

Other GSSAPI errors on failure.


πŸ“ OM_uint32 globus_gss_assist_export_sec_context

OM_uint32 globus_gss_assist_export_sec_context (OM_uint32 * minor_status,
    gss_ctx_id_t * context_handle, int * token_status, int fdp, FILE *
    fperr)

Export the security context from a file

Parameters

  • minor_status β€” GSSAPI return code. This is a Globus Error code (or GLOBUS_SUCCESS) cast to a OM_uint32 pointer. If an error has occurred, the resulting error (from calling globus_error_get on this variable) needs to be freed by the caller
  • context_handle β€” The context to export
  • token_status β€” Errors that occurred while reading from the file
  • fdp β€” the file descriptor pointing to a file containing the security context
  • fperr β€” FILE * to write error messages

Returns

the major status


🫢 OM_uint32 globus_gss_assist_get_unwrap

OM_uint32 globus_gss_assist_get_unwrap (OM_uint32 * minor_status, const
    gss_ctx_id_t context_handle, char ** data, size_t * length, int *
    token_status, int(* gss_assist_get_token )(void *, void **, size_t *),
    void * gss_assist_get_context, FILE * fperr)

Get Unwrap.

Gets a token using the specific tokenizing functions, and performs the GSS unwrap of that token

See also

gss_unwrap

Parameters

  • minor_status β€” GSSAPI return code,

See also

gss_unwrap

Parameters

  • context_handle β€” the context
  • data β€” pointer to be set to the unwrapped application data. This must be freed by the caller.
  • length β€” pointer to be set to the length of the data byte array.
  • token_status β€” assist routine get/send token status
  • gss_assist_get_token β€” a detokenizing routine
  • gss_assist_get_context β€” first arg for above routine
  • fperr β€” error stream to print to

Returns

GSS_S_COMPLETE on success Other gss errors on failure.


πŸ¦„ OM_uint32 globus_gss_assist_import_sec_context

OM_uint32 globus_gss_assist_import_sec_context (OM_uint32 * minor_status,
    gss_ctx_id_t * context_handle, int * token_status, int fdp, FILE *
    fperr)

Import the security context from a file

Parameters

  • minor_status β€” GSSAPI return code. This is a Globus Error code (or GLOBUS_SUCCESS) cast to a OM_uint32 pointer. If an error has occurred, the resulting error (from calling globus_error_get on this variable) needs to be freed by the caller
  • context_handle β€” The imported context
  • token_status β€” Errors that occurred while reading from the file
  • fdp β€” the file descriptor pointing to a file containing the security context
  • fperr β€” FILE * to write error messages

Returns

the major status


⭐ OM_uint32 globus_gss_assist_init_sec_context

OM_uint32 globus_gss_assist_init_sec_context (OM_uint32 * minor_status,
    const gss_cred_id_t cred_handle, gss_ctx_id_t * context_handle, char *
    target_name_char, OM_uint32 req_flags, OM_uint32 * ret_flags, int *
    token_status, int(* gss_assist_get_token )(void *, void **, size_t *),
    void * gss_assist_get_context, int(* gss_assist_send_token )(void *,
    void *, size_t), void * gss_assist_send_context)

Initialize a GSSAPI security connection.

Used by the client. The context_handle is returned, and there is one for each connection. This routine will take cake of the looping and token processing, using the supplied get_token and send_token routines.

bestie we are NOT done yet, there's more coming in part 2 πŸ’– don't go anywhere

Parameters

  • minor_status β€” bestie, this is the GSSAPI return code. The new minor_status is a globus_result_t cast to an OM_uint32. If the call was successful, the minor status is equivalent to GLOBUS_SUCCESS. Otherwise, it's a globus error object ID that you can pass to globus_error_get to get the error object. And you need to free that error object with globus_object_free. No cap. πŸ’…
  • cred_handle β€” the cred handle you got from acquire_cred. Periodt.
  • context_handle β€” pointer to returned context. It's giving "here's your context bestie". ✨
  • target_name_char β€” char string representation of the server to be contacted. Like, the server's name in char form.
  • req_flags β€” request flags, such as GSS_C_DELEG_FLAG for delegation and the GSS_C_MUTUAL_FLAG for mutual authentication. These are the vibes you're requesting. πŸŽ€
  • ret_flags β€” Pointer to which services are available after the connection is established. Maybe NULL if not wanted. You can skip it if you don't care.

The following are particular to this assist routine:

Parameters

  • token_status β€” the assist routine's get/send token status. Like, how's the token doing? πŸ‘€
  • gss_assist_get_token β€” function pointer for getting the token. It's a pointer to a function, okay?
  • gss_assist_get_context β€” first argument passed to the gss_assist_get_token function. So when you call that function, this is the first thing you pass.
  • gss_assist_send_token β€” function pointer for setting the token. (Yes, it says setting, but the name is send_token. iykyk.)
  • gss_assist_send_context β€” first argument passed to the gss_assist_set_token function pointer. (Note: the original says gss_assist_set_token here, so we keep it exactly.)

Returns

The major status. That's it. The major status. πŸ’―


globus_gss_assist_init_sec_context_async

OM_uint32 globus_gss_assist_init_sec_context_async (OM_uint32 *
    minor_status, const gss_cred_id_t cred_handle, gss_ctx_id_t *
    context_handle, char * target_name_char, OM_uint32 req_flags, OM_uint32
    * ret_flags, void * input_buffer, size_t input_buffer_len, void **
    output_bufferp, size_t * output_buffer_lenp)

Okay so this is the asynchronous version of the globus_gss_assist_init_sec_context() function. Instead of looping itself, it passes in and out the read and written buffers and the calling application is responsible for doing the I/O directly. You're the main character now, you do the I/O. πŸ‘‘

Parameters

  • minor_status β€” GSSAPI return code. The new minor status is a globus_result_t cast to a OM_uint32. If an error occurred (GSS_ERROR(major_status)) the minor_status is a globus error object id. The error object can be obtained via globus_error_get and should be destroyed with globus_object_free when no longer needed. If no error occurred, the minor status is equal to GLOBUS_SUCCESS.
  • cred_handle β€” the cred handle obtained by acquire_cred.
  • context_handle β€” pointer to returned context.
  • target_name_char β€” char string representation of the server to be contacted.
  • req_flags β€” request flags, such as GSS_C_DELEG_FLAG for delegation and the GSS_C_MUTUAL_FLAG for mutual authentication.
  • ret_flags β€” Pointer to which services are available after the connection is established. Maybe NULL if not wanted.
  • input_buffer β€” pointer to a buffer received from peer. Should be NULL on first call.
  • input_buffer_len β€” length of the buffer input_buffer. Should be zero on first call.
  • output_bufferp β€” pointer to a pointer which will be filled in with a pointer to an allocated block of memory. If non-NULL the contents of this block should be written to the peer where they will be fed into the globus_gss_assist_accept_sec_context_async() function.
  • output_buffer_lenp β€” pointer to an integer which will be filled in with the length of the allocated output buffer pointed to by *output_bufferp.

Returns

  • GSS_S_COMPLETE on successful completion when this function does not need to be called again.
  • GSS_S_CONTINUE_NEEDED when *output_bufferp should be sent to the peer and a new input_buffer read and this function called again.
  • Other gss errors on failure.

globus_gss_assist_will_handle_restrictions

OM_uint32 globus_gss_assist_will_handle_restrictions (OM_uint32 *
    minor_status, gss_ctx_id_t * context_handle)

Sets the context to handle restrictions. It's giving "I got this, bestie". πŸ’ͺ

Parameters

  • minor_status β€” the resulting minor status from setting the context handle
  • context_handle β€” the context handle to set the minor status of

Returns

the major status from setting the context


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for globus_gss_assist from the source code. Slay. ✨


That's the tea, bestie! This was globus_gss...ist_context(3) from globus_gss_assist, Version 12.7. Stay iconic πŸ’…πŸ¦‹
πŸ“¦ where this page comes from