---
name: "globus_gsi_gss_assist"
section: "3"
platform: "linux"
package: "libglobus-gss-assist-doc"
version: "8.5-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gsi_gss_assist"
---

# globus\_gsi\_gss\_assist(3)

## NAME

Utility Functions -

### Defines

\#define **GlobusGssAssistFreeDNArray**(dn\_a)\
 \#define **NI\_MAXHOST**   255\

### Functions

int **globus\_gss\_assist\_gridmap** (char \*globusidp, char \*\*useridp)\
 int **globus\_gss\_assist\_userok** (char \*globusid, char \*userid)\
 int **globus\_gss\_assist\_map\_local\_user** (char \*local\_user, char \*\*globusidp)\
 globus\_result\_t **globus\_gss\_assist\_lookup\_all\_globusid** (char \*username, char \*\*dns\[\], int \*dn\_count)\
 globus\_result\_t **globus\_gss\_assist\_map\_and\_authorize** (gss\_ctx\_id\_t context, char \*service, char \*desired\_identity, char \*identity\_buffer, unsigned int identity\_buffer\_length)\

### Accept Security 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 Security Context Asyncronous

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)\

### Acquire Credential

OM\_uint32 **globus\_gss\_assist\_acquire\_cred** (OM\_uint32 \*minor\_status, gss\_cred\_usage\_t cred\_usage, gss\_cred\_id\_t \*output\_cred\_handle)\

### Acquire Credential Extension

OM\_uint32 **globus\_gss\_assist\_acquire\_cred\_ext** (OM\_uint32 \*minor\_status, char \*desired\_name\_char, OM\_uint32 time\_req, const gss\_OID\_set desired\_mechs, gss\_cred\_usage\_t cred\_usage, gss\_cred\_id\_t \*output\_cred\_handle, gss\_OID\_set \*actual\_mechs, OM\_uint32 \*time\_rec)\

### Display Status

OM\_uint32 **globus\_gss\_assist\_display\_status** (FILE \*fp, char \*comment, OM\_uint32 major\_status, OM\_uint32 minor\_status, int token\_status)\

### Display Status String

OM\_uint32 **globus\_gss\_assist\_display\_status\_str** (char \*\*str, char \*comment, OM\_uint32 major\_status, OM\_uint32 minor\_status, int token\_status)\
 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)\

### Init Security 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)\

### Init Security 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)\

### Will Handle Restrictions

OM\_uint32 **globus\_gss\_assist\_will\_handle\_restrictions** (OM\_uint32 \*minor\_status, gss\_ctx\_id\_t \*context\_handle)\

### 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)\

### Wrap

OM\_uint32 **globus\_gss\_assist\_wrap\_send** (OM\_uint32 \*minor\_status, const gss\_ctx\_id\_t context\_handle, char \*data, size\_t length, int \*token\_status, int(\*gss\_assist\_send\_token)(void \*, void \*, size\_t), void \*gss\_assist\_send\_context, FILE \*fperr)\

## Detailed Description

Utility functions for GSSAPI.

## Define Documentation

### #define GlobusGssAssistFreeDNArray(dn\_a)

Free array of distinguished names. Free the contents of a name array created during a successful call to **globus\_gss\_assist\_lookup\_all\_globusid()**

**Parameters:**

*dn\_a* Array of names to free.

**Return values:**

*void*

### #define NI\_MAXHOST 255

Create a GSS Name structure from the given hostname. This function tries to resolve the given host name string to the canonical DNS name for the host.

**Parameters:**

*hostname* The host name or numerical address to be resolved and transform into a GSS Name \
 *authorization\_hostname* The resulting GSS Name

**Returns:**

GLOBUS\_SUCCESS on successful completion, a error object otherwise

## Function Documentation

### OM\_uint32 globus\_gss\_assist\_accept\_sec\_context (OM\_uint32 \*minor\_status, gss\_ctx\_id\_t \*context\_handle, const gss\_cred\_id\_tcred\_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(\*)(void \*, void \*\*, size\_t \*)gss\_assist\_get\_token, void \*gss\_assist\_get\_context, int(\*)(void \*, void \*, size\_t)gss\_assist\_send\_token, void \*gss\_assist\_send\_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 repersentation 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\_ssleay \
 *user\_to\_user\_flag* Pointer to flag to be set if the src\_name is the same as our name. (Follwing 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 sucess Other gss errors on failure.

### OM\_uint32 globus\_gss\_assist\_accept\_sec\_context\_async (OM\_uint32 \*minor\_status, gss\_ctx\_id\_t \*context\_handle, const gss\_cred\_id\_tcred\_handle, char \*\*src\_name\_char, OM\_uint32 \*ret\_flags, int \*user\_to\_user\_flag, void \*input\_buffer, size\_tinput\_buffer\_len, void \*\*output\_bufferp, size\_t \*output\_buffer\_lenp, gss\_cred\_id\_t \*delegated\_cred\_handle)

This is a 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.

**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 repersentation 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\_ssleay \
 *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 a 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 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 gss errors on failure.

### OM\_uint32 globus\_gss\_assist\_acquire\_cred (OM\_uint32 \*minor\_status, gss\_cred\_usage\_tcred\_usage, gss\_cred\_id\_t \*output\_cred\_handle)

Called once at the start of the process, to obtain the credentials the process is running under. The

**Parameters:**

*minor\_status* pointer for return code \
 *cred\_usage* GSS\_C\_INITIATE, GSS\_C\_ACCEPT, or GSS\_C\_BOTH \
 *output\_cred\_handle* Pointer to the returned handle. This needs to be passed to many gss routines.

**Returns:**

GSS\_S\_COMPLETE on sucess Other GSS return codes

### OM\_uint32 globus\_gss\_assist\_acquire\_cred\_ext (OM\_uint32 \*minor\_status, char \*desired\_name\_char, OM\_uint32time\_req, const gss\_OID\_setdesired\_mechs, gss\_cred\_usage\_tcred\_usage, gss\_cred\_id\_t \*output\_cred\_handle, gss\_OID\_set \*actual\_mechs, OM\_uint32 \*time\_rec)

Called once at the start of the process, to obtain the credentials the process is running under. All the parameters of the gss\_acquire\_cred, except the desired\_name is a string of the form: \[type:\]name. This will be imported with the type.

**Returns:**

GSS\_S\_COMPLETE on sucess Other GSS return codes

**See also:**

globus\_gsi\_gss\_acquire\_cred

### OM\_uint32 globus\_gss\_assist\_display\_status (FILE \*fp, char \*comment, OM\_uint32major\_status, OM\_uint32minor\_status, inttoken\_status)

Display the messages for the major and minor status on the file pointed at by fp. Takes care of the overloaded major\_status if there was a problem with the get\_token or send\_token routines.

**Parameters:**

*fp* a file pointer \
 *comment* String to print out before other error messages. \
 *major\_status* The major status to display \
 *minor\_status* The minor status to display \
 *token\_status* token status to display

**Returns:**

0

### OM\_uint32 globus\_gss\_assist\_display\_status\_str (char \*\*str, char \*comment, OM\_uint32major\_status, OM\_uint32minor\_status, inttoken\_status)

Display the messages for the major and minor status and return a string with the messages. Takes care of the overloaded major\_status if there was a problem with the get\_token or send\_token routines.

**Parameters:**

*str* pointer to char \* for returned string. Must be freed \
 *comment* String to print out before other error messages. \
 *major\_status* The major status to display \
 *minor\_status* The minor status to display \
 *token\_status* token status to display

**Returns:**

0

### int globus\_gss\_assist\_gridmap (char \*globusidp, char \*\*useridp)

Look up the default mapping for a Grid identity in a gridmap file. The **globus\_gss\_assist\_gridmap()** function parses the default gridmap file and modifies its *useridp* parameter to point to a copy of the string containing the default local identity that the grid identity is mapped to. If successful, the caller is responsible for freeing the string pointed to by *useridp*.

By default, **globus\_gss\_assist\_gridmap()** looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that is not set, it falls back to $HOME/.gridmap.

**Parameters:**

*globusidp* The GSSAPI name string of the identity who requested authorization \
 *useridp* A pointer to a string to be set to the default user ID for the local system. No validation is done to check that such a user exists.

**Returns:**

On success, **globus\_gss\_assist\_gridmap()** returns 0 and modifies the the string pointed to by the *useridp* parameter. If an error occurs, a non-zero value is returned and the value pointed to by *useridp* is undefined.

**Return values:**

*GLOBUS\_SUCCESS* Success \
 *1* Error

### int globus\_gss\_assist\_userok (char \*globusid, char \*userid)

Gridmap entry existence check. The **globus\_gss\_assist\_userok()** function parses the default gridmap file and checks whether any mapping exists for the grid identity passed as the *globusid* parameter and the local user identity passed as the @ userid parameter.

By default, **globus\_gss\_assist\_userok()** looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that is not set, it falls back to $HOME/.gridmap.

**Parameters:**

*globusid* The GSSAPI name string of the identity who requested authorization \
 *userid* The local account name that access is sought for.

**Returns:**

If **globus\_gss\_assist\_userok()** is able to find a mapping between *globusid* and *userid*, it returns 0; otherwise it returns 1.

**Return values:**

*GLOBUS\_SUCCESS* Success \
 *1* Error

### int globus\_gss\_assist\_map\_local\_user (char \*local\_user, char \*\*globusidp)

Look up the default Grid identity associated with a local user name. The **globus\_gss\_assist\_map\_local\_user()** function parses the gridmap file to determine a if the user name passed as the *local\_user* parameter is the default local user for a Grid ID in the gridmap file. If so, it modifies *globusidp* to point to a copy of that ID. Otherwise, it searches the gridmap file for a Grid ID that has a non-default mapping for *local\_user* and modifies *globusidp* to point to a copy of that ID. If successful, the caller is responsible for freeing the string pointed to by the *globusidp* pointer.

By default, **globus\_gss\_assist\_map\_local\_user()** looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that is not set, it falls back to $HOME/.gridmap.

**Parameters:**

*local\_user* The local username to find a Grid ID for \
 *globusidp* A Grid ID that maps from the local\_user.

**Returns:**

On success, **globus\_gss\_assist\_map\_local\_user()** returns 0 and modifies *globusidp* to point to a Grid ID that maps to *local\_user*; otherwise, **globus\_gss\_assist\_map\_local\_user()** returns 1 and the value pointed to by *globusidp* is undefined.

**Return values:**

*GLOBUS\_SUCCESS* Success \
 *1* Error

### globus\_result\_t globus\_gss\_assist\_lookup\_all\_globusid (char \*username, char \*\*dns\[\], int \*dn\_count)

Look up all Grid IDs associated with a local user ID. The **globus\_gss\_assist\_lookup\_all\_globusid()** function parses a gridmap file and finds all Grid IDs that map to a local user ID. The *dns* parameter is modified to point to an array of Grid ID strings from the gridmap file, and the *dn\_count* parameter is modified to point to the number of Grid ID strings in the array. The caller is responsible for freeing the array using the macro **GlobusGssAssistFreeDNArray().**

**By default, globus\_gss\_assist\_lookup\_all\_globusid() looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that is not set, it falls back to $HOME/.gridmap.**

**Parameters:**

*username* **The local username to look up in the gridmap file.** \
 *dns* **A pointer to an array of strings. This function modifies this to point to a newly allocated array of strings. The caller must use the macro GlobusGssAssistFreeDNArray() to free this memory.** \
 *dn\_count* **A pointer to an integer that is modified to contain the number of entries in the array returned via the** *dns* **parameter.**

**Returns:**

**On success, globus\_gss\_assist\_lookup\_all\_globusid() returns GLOBUS\_SUCCESS and modifies its** *dns* **and** *dn\_count* **parameters as described above. If an error occurs, globus\_gss\_assist\_lookup\_all\_globusid() returns a globus\_result\_t that can be resolved to an error object and the values pointed to by** *dns* **and** *dn\_count* **are undefined.**

**Return values:**

*GLOBUS\_SUCCESS* **Success** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_ERROR\_WITH\_ARGUMENTS* **Error with arguments** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_ERROR\_WITH\_GRIDMAP* **Invalid path to gridmap** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_ERROR\_ERRNO* **System error**

### globus\_result\_t globus\_gss\_assist\_map\_and\_authorize (gss\_ctx\_id\_tcontext, char \*service, char \*desired\_identity, char \*identity\_buffer, unsigned intidentity\_buffer\_length)

**Authorize the peer of a security context to use a service. The globus\_gss\_assist\_map\_and\_authorize() function attempts to authorize the peer of a security context to use a particular service. If the** *desired\_identity* **parameter is non-NULL, the authorization will succeed only if the peer is authorized for that identity. Otherwise, any valid authorized local user name will be used. If authorized, the local user name will be copied to the string pointed to by the** *identity\_buffer* **parameter, which must be at least as long as the value passed as the** *identity\_buffer\_length* **parameter.**

**If authorization callouts are defined in the callout configuration file, globus\_gss\_assist\_map\_and\_authorize() will invoke both the GLOBUS\_GENERIC\_MAPPING\_TYPE callout and the GLOBUS\_GENERIC\_AUTHZ\_TYPE callout; otherwise the default gridmap file will be used for mapping and no service-specific authorization will be done.**

**If globus\_gss\_assist\_map\_and\_authorize() uses a gridmap file, it first looks for a file defined by the value of the GRIDMAP environment variable. If that is not set, it falls back to $HOME/.gridmap.**

**Parameters:**

*context* **Security context to inspect for peer identity information.** \
 *service* **A NULL-terminated string containing the name of the service that an authorization decision is being made for.** \
 *desired\_identity* **Optional. If non-NULL, perform an authorization to act as the local user named by this NULL-terminated string.** \
 *identity\_buffer* **A pointer to a string buffer into which will be copied the local user name that the peer of the context is authorized to act as.** \
 *identity\_buffer\_length* **Length of the** *identity\_buffer* **array.**

**Returns:**

**On success, globus\_gss\_assist\_map\_and\_authorize() returns GLOBUS\_SUCCESS and copies the authorized local identity to the** *identity\_buffer* **parameter. If an error occurs, globus\_gss\_assist\_map\_and\_authorize() returns a globus\_result\_t that can be resolved to an error object.**

**Return values:**

*GLOBUS\_SUCCESS* **Success** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_ERROR\_WITH\_CALLOUT\_CONFIG* **Invalid authorization configuration file** \
 *GLOBUS\_CALLOUT\_ERROR\_WITH\_HASHTABLE* **Hash table operation failed.** \
 *GLOBUS\_CALLOUT\_ERROR\_CALLOUT\_ERROR* **The callout itself returned a error.** \
 *GLOBUS\_CALLOUT\_ERROR\_WITH\_DL* **Dynamic library operation failed.** \
 *GLOBUS\_CALLOUT\_ERROR\_OUT\_OF\_MEMORY* **Out of memory** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_GSSAPI\_ERROR* **A GSSAPI function returned an error** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_GRIDMAP\_LOOKUP\_FAILED* **Gridmap lookup failure** \
 *GLOBUS\_GSI\_GSS\_ASSIST\_BUFFER\_TOO\_SMALL* **Caller provided insufficient buffer space for local identity**

### OM\_uint32 globus\_gss\_assist\_import\_sec\_context (OM\_uint32 \*minor\_status, gss\_ctx\_id\_t \*context\_handle, int \*token\_status, intfdp, 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 erro 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 \*minor\_status, const gss\_cred\_id\_tcred\_handle, gss\_ctx\_id\_t \*context\_handle, char \*target\_name\_char, OM\_uint32req\_flags, OM\_uint32 \*ret\_flags, int \*token\_status, int(\*)(void \*, void \*\*, size\_t \*)gss\_assist\_get\_token, void \*gss\_assist\_get\_context, int(\*)(void \*, void \*, size\_t)gss\_assist\_send\_token, 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.**

**Parameters:**

*minor\_status* **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 equivalant to GLOBUS\_SUCCESS. Otherwise, it is a globus error object ID that can be passed to globus\_error\_get to get the error object. The error object needs to be freed with globus\_object\_free.** \
 *cred\_handle* **the cred handle obtained by acquire\_cred.** \
 *context\_handle* **pointer to returned context.** \
 *target\_name\_char* **char string repersentation 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.**

**The Follwing are particular to this assist routine:**

**Parameters:**

*token\_status* **the assist routine's get/send token status** \
 *gss\_assist\_get\_token* **function pointer for getting the token** \
 *gss\_assist\_get\_context* **first argument passed to the gss\_assist\_get\_token function** \
 *gss\_assist\_send\_token* **function pointer for setting the token** \
 *gss\_assist\_send\_context* **first argument passed to the gss\_assist\_set\_token function pointer**

**Returns:**

**The major status**

### OM\_uint32 globus\_gss\_assist\_init\_sec\_context\_async (OM\_uint32 \*minor\_status, const gss\_cred\_id\_tcred\_handle, gss\_ctx\_id\_t \*context\_handle, char \*target\_name\_char, OM\_uint32req\_flags, OM\_uint32 \*ret\_flags, void \*input\_buffer, size\_tinput\_buffer\_len, void \*\*output\_bufferp, size\_t \*output\_buffer\_lenp)

**This is a 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.**

**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 repersentation 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 a 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 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.**

**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.**

### OM\_uint32 globus\_gss\_assist\_will\_handle\_restrictions (OM\_uint32 \*minor\_status, gss\_ctx\_id\_t \*context\_handle)

**Sets the context to handle restrictions. 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**

### OM\_uint32 globus\_gss\_assist\_get\_unwrap (OM\_uint32 \*minor\_status, const gss\_ctx\_id\_tcontext\_handle, char \*\*data, size\_t \*length, int \*token\_status, int(\*)(void \*, void \*\*, size\_t \*)gss\_assist\_get\_token, void \*gss\_assist\_get\_context, FILE \*fperr)

**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 sucess Other gss errors on failure.**

### OM\_uint32 globus\_gss\_assist\_wrap\_send (OM\_uint32 \*minor\_status, const gss\_ctx\_id\_tcontext\_handle, char \*data, size\_tlength, int \*token\_status, int(\*)(void \*, void \*, size\_t)gss\_assist\_send\_token, void \*gss\_assist\_send\_context, FILE \*fperr) Parameters:

*minor\_status* **GSSAPI return code. If the call was successful, the minor status is equal to GLOBUS\_SUCCESS. Otherwise, it is an error object ID for which globus\_error\_get() and globus\_object\_free() can be used to get and destroy it.** \
 *context\_handle* **the context.** \
 *data* **pointer to application data to wrap and send** \
 *length* **length of the** *data* **array** \
 *token\_status* **assist routine get/send token status** \
 *gss\_assist\_send\_token* **a send\_token routine** \
 *gss\_assist\_send\_context* **first arg for the send\_token** \
 *fperr* **file handle to write error message to.**

**Returns:**

**GSS\_S\_COMPLETE on sucess Other gss errors on failure.**

**See also:**

**gss\_wrap()**

## Author

**Generated automatically by Doxygen for globus gss assist from the source code.**
