GLOBUS_GSS_ASSIST_INIT_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 codecontext_handleβ pointer to returned context.cred_handleβ the cred handle obtained byacquire_cred.src_name_charβ Pointer to char string representation of the client which contacted the server. MaybeNULLif not wanted. Should be freed when done.ret_flagsβ Pointer to which services are available after the connection is established. MaybeNULLif not wanted. We will also use this to pass in flags to the globus version of GSSAPIuser_to_user_flagβ Pointer to flag to be set if thesrc_nameis the same as our name. (Following are particular to this assist routine)token_statusβ assist routine get/send token statusdelegated_cred_handleβ pointer to be set to the credential delegated by the client if delegation occurs during the security handshakegss_assist_get_tokenβ a get token routinegss_assist_get_contextβ first arg for the get token routinegss_assist_send_tokenβ a send token routinegss_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 codecontext_handleβ pointer to returned context.cred_handleβ the cred handle obtained byacquire_cred.src_name_charβ Pointer to char string representation of the client which contacted the server. MaybeNULLif not wanted. Should be freed when done.ret_flagsβ Pointer to which services are available after the connection is established. MaybeNULLif not wanted. We will also use this to pass in flags to the Globus version of GSSAPIuser_to_user_flagβ Pointer to flag to be set if thesrc_nameis the same as our name.input_bufferβ pointer to a buffer received from peer.input_buffer_lenβ length of the bufferinput_buffer.output_bufferpβ pointer to a pointer which will be filled in with a pointer to an allocated block of memory. If non-NULLthe contents of this block should be written to the peer where they will be fed into theglobus_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 (orGLOBUS_SUCCESS) cast to aOM_uint32pointer. If an error has occurred, the resulting error (from callingglobus_error_geton this variable) needs to be freed by the callercontext_handleβ The context to exporttoken_statusβ Errors that occurred while reading from the filefdpβ the file descriptor pointing to a file containing the security contextfperrβ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 contextdataβ 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 statusgss_assist_get_tokenβ a detokenizing routinegss_assist_get_contextβ first arg for above routinefperrβ 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 (orGLOBUS_SUCCESS) cast to aOM_uint32pointer. If an error has occurred, the resulting error (from callingglobus_error_geton this variable) needs to be freed by the callercontext_handleβ The imported contexttoken_statusβ Errors that occurred while reading from the filefdpβ the file descriptor pointing to a file containing the security contextfperrβ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 newminor_statusis aglobus_result_tcast to anOM_uint32. If the call was successful, the minor status is equivalent toGLOBUS_SUCCESS. Otherwise, it's a globus error object ID that you can pass toglobus_error_getto get the error object. And you need to free that error object withglobus_object_free. No cap. πcred_handleβ the cred handle you got fromacquire_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 asGSS_C_DELEG_FLAGfor delegation and theGSS_C_MUTUAL_FLAGfor mutual authentication. These are the vibes you're requesting. πret_flagsβ Pointer to which services are available after the connection is established. MaybeNULLif 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 thegss_assist_get_tokenfunction. 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 thegss_assist_set_tokenfunction pointer. (Note: the original saysgss_assist_set_tokenhere, 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 aglobus_result_tcast to aOM_uint32. If an error occurred (GSS_ERROR(major_status)) theminor_statusis a globus error object id. The error object can be obtained viaglobus_error_getand should be destroyed withglobus_object_freewhen no longer needed. If no error occurred, the minor status is equal toGLOBUS_SUCCESS.cred_handleβ the cred handle obtained byacquire_cred.context_handleβ pointer to returned context.target_name_charβ char string representation of the server to be contacted.req_flagsβ request flags, such asGSS_C_DELEG_FLAGfor delegation and theGSS_C_MUTUAL_FLAGfor mutual authentication.ret_flagsβ Pointer to which services are available after the connection is established. MaybeNULLif not wanted.input_bufferβ pointer to a buffer received from peer. Should beNULLon first call.input_buffer_lenβ length of the bufferinput_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-NULLthe contents of this block should be written to the peer where they will be fed into theglobus_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_COMPLETEon successful completion when this function does not need to be called again.GSS_S_CONTINUE_NEEDEDwhen*output_bufferpshould be sent to the peer and a newinput_bufferread 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 handlecontext_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 wasglobus_gss...ist_context(3)fromglobus_gss_assist, Version 12.7. Stay iconic π π¦
π¦ where this page comes from
- fedora 43: globus-gss-assist-doc 12.7-9.fc43 Β· Apache-2.0
- fedora 44: globus-gss-assist-doc 12.7-10.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-gss-assist-doc 12.7-3build2 Β· Apache-2.0
- ubuntu stonking: libglobus-gss-assist-doc 12.7-4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms